[pLog-svn] r3397 - plog/trunk/class/net/http/session

mark at devel.lifetype.net mark at devel.lifetype.net
Fri May 12 16:26:48 GMT 2006


Author: mark
Date: 2006-05-12 16:26:47 +0000 (Fri, 12 May 2006)
New Revision: 3397

Modified:
   plog/trunk/class/net/http/session/sessionmanager.class.php
Log:
Change the sessionname according to the disscusion in mailing list.

We can not use the script name as part of session name, it will cause different scripts have different sessions even in the same installation.

So, we just use base_url only.

Modified: plog/trunk/class/net/http/session/sessionmanager.class.php
===================================================================
--- plog/trunk/class/net/http/session/sessionmanager.class.php	2006-05-12 08:59:34 UTC (rev 3396)
+++ plog/trunk/class/net/http/session/sessionmanager.class.php	2006-05-12 16:26:47 UTC (rev 3397)
@@ -36,12 +36,10 @@
             $sessionDomain = SessionManager::setSessionCookieDomain();
 		
 			session_cache_limiter( "" );
-            $serverVars = HttpVars::getServer();
-                // append scriptURL to distinguish between
-                // multiple installs on the same domain
-                // session_name is not well documented, but some people
-                // say it will fail with non-alphanumerics
-            $sessionName = "LT" . preg_replace("/[^a-zA-Z0-9]/", "", $serverVars['SCRIPT_FILENAME']);
+			// Use base_url as part of session name to support multiplue lifetype installations in the one site
+			$config =& Config::getConfig();
+			$baseURL = $config->getValue( "base_url" );
+            $sessionName = "LT" . preg_replace("/[^a-zA-Z0-9]/", "", $baseURL);
             session_name( $sessionName );
 
             session_set_cookie_params(0, $sessionPath, $sessionDomain);



More information about the pLog-svn mailing list