From 05b06d34496236b42227c4fedb7611ce35d0bebb Mon Sep 17 00:00:00 2001 From: cigamit Date: Sat, 8 Nov 2003 18:57:14 +0000 Subject: [PATCH] Error Dispaly fix: can't do set_time_limit() in safemode git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6129 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/mail_fetch/class.POP3.php | 6 ++++-- plugins/mail_fetch/fetch.php | 4 +++- plugins/mail_fetch/setup.php | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/mail_fetch/class.POP3.php b/plugins/mail_fetch/class.POP3.php index 73054318..a61bfa8f 100644 --- a/plugins/mail_fetch/class.POP3.php +++ b/plugins/mail_fetch/class.POP3.php @@ -62,13 +62,15 @@ class POP3 { if(!empty($timeout)) { settype($timeout,"integer"); $this->TIMEOUT = $timeout; - set_time_limit($timeout); + if (!ini_get('safe_mode')) + set_time_limit($timeout); } return true; } function update_timer () { - set_time_limit($this->TIMEOUT); + if (!ini_get('safe_mode')) + set_time_limit($this->TIMEOUT); return true; } diff --git a/plugins/mail_fetch/fetch.php b/plugins/mail_fetch/fetch.php index d2e6eaef..26260ed5 100644 --- a/plugins/mail_fetch/fetch.php +++ b/plugins/mail_fetch/fetch.php @@ -228,7 +228,9 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); for (; $i <= $Count; $i++) { Mail_Fetch_Status(_("Fetching message ") . "$i" ); - set_time_limit(20); // 20 seconds per message max + + if (!ini_get('safe_mode')) + set_time_limit(20); // 20 seconds per message max $Message = ''; $MessArray = $pop3->get($i); diff --git a/plugins/mail_fetch/setup.php b/plugins/mail_fetch/setup.php index cfe8c606..c84b3994 100644 --- a/plugins/mail_fetch/setup.php +++ b/plugins/mail_fetch/setup.php @@ -166,7 +166,8 @@ $outMsg .= _("Server does not support UIDL."); for (; $i <= $Count; $i++) { - set_time_limit(20); // 20 seconds per message max + if (!ini_get('safe_mode')) + set_time_limit(20); // 20 seconds per message max $Message = ""; $MessArray = $pop3->get($i); -- 2.25.1