From: kink Date: Thu, 21 Aug 2003 09:40:53 +0000 (+0000) Subject: Replace all session_start() calls with sqsession_is_active(). The latter X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=748ba6c04d400a0433b06dd90d4d6042d86478e2;ds=inline Replace all session_start() calls with sqsession_is_active(). The latter is a conditional session_start which will only start a session if none has been before. This will make us compatible with the upcoming PHP 4.3.3 release. Thanks Phil Driscoll for the tip. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5535 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/ChangeLog b/ChangeLog index b4c361f8..3708a006 100644 --- a/ChangeLog +++ b/ChangeLog @@ -76,7 +76,9 @@ Version 1.5.0 -- CVS - sqimap_msgs_list_copy() no longer deletes messages copied. - Workaround for Mozilla bug #200412 in order to show multipart/related html mail. - Fix for disapearing '0' from decoded strings (bug #784193) - + - Replace all session_start() calls with sqsession_is_active() to be compatible + with upcoming PHP 4.3.3. + ************************************** *** SquirrelMail Stable Series 1.4 *** diff --git a/include/validate.php b/include/validate.php index e12811d4..38213458 100644 --- a/include/validate.php +++ b/include/validate.php @@ -50,7 +50,7 @@ if(isset($session_name) && $session_name) { ini_set('session.name' , 'SQMSESSID'); } -session_start(); +sqsession_is_active(); require_once(SM_PATH . 'functions/i18n.php'); require_once(SM_PATH . 'functions/auth.php'); diff --git a/src/redirect.php b/src/redirect.php index 6f6f6997..6bdff659 100644 --- a/src/redirect.php +++ b/src/redirect.php @@ -37,7 +37,7 @@ header('Pragma: no-cache'); $location = get_location(); session_set_cookie_params (0, $base_uri); -session_start(); +sqsession_is_active(); sqsession_unregister ('user_is_logged_in'); sqsession_register ($base_uri, 'base_uri'); diff --git a/src/webmail.php b/src/webmail.php index d5f8c593..565c5c07 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -31,7 +31,7 @@ if (!function_exists('sqm_baseuri')){ } $base_uri = sqm_baseuri(); -session_start(); +sqsession_is_active(); sqgetGlobalVar('username', $username, SQ_SESSION); sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);