Session naming in devel.
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 30 Dec 2002 19:52:19 +0000 (19:52 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 30 Dec 2002 19:52:19 +0000 (19:52 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4325 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/global.php
include/validate.php

index cead10a291e9c917f843d096b278e0136aed6c12..5bbfd796a4dd34c64d411fd04ad085a2998815bf 100644 (file)
  * $Id$
  */
 
+require_once(SM_PATH . 'config/config.php');
+
+/* set the name of the session cookie */
+if(isset($session_name) && $session_name) {  
+    ini_set('session.name' , $session_name);  
+} else {  
+    ini_set('session.name' , 'SQMSESSID');  
+}
+
 /* If magic_quotes_runtime is on, SquirrelMail breaks in new and creative ways.
  * Force magic_quotes_runtime off.
  * chilts@birdbrained.org - I put it here in the hopes that all SM code includes this.
index 41116656267f2012eaaf7a63b29143d4ef95cab7..f27fb33e27cc3ffbfb4ecd8e4b920d7ab9783b67 100644 (file)
  * ** Note this means that for the 1.3.2 release, we should probably
  * recommend that people set session.auto_start=0 to avoid this altogether.
  */
+
 session_write_close();
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'class/mime.class.php');
+require_once(SM_PATH . 'config/config.php');
+
+/* set the name of the session cookie */
+if(isset($session_name) && $session_name) {
+    ini_set('session.name' , $session_name);
+} else {
+    ini_set('session.name' , 'SQMSESSID');
+}
 
 session_start();
 
@@ -80,7 +89,6 @@ global $theme;
 unset($theme);
 $theme=array();
 
-require_once(SM_PATH . 'config/config.php');
 require_once(SM_PATH . 'include/load_prefs.php');
 require_once(SM_PATH . 'functions/page_header.php');
 require_once(SM_PATH . 'functions/prefs.php');