* (bug 3990) Use existing session name if session.auto_start is on
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 15 Jan 2006 08:05:28 +0000 (08:05 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 15 Jan 2006 08:05:28 +0000 (08:05 +0000)
  Fixes checks for open sessions, such as the cookie warning on login.
  Patch by Zbigniew Braniecki.

RELEASE-NOTES
includes/Setup.php

index c0cbe8e..16b80bd 100644 (file)
@@ -499,6 +499,9 @@ fully support the editing toolbar, but was found to be too confusing.
 * Move PHP 5-friendly XHTML doctype hack to Sanitizer, use for sig checks.
   Fixes use of named entities in sigs on PHP 5
 * (bug 4482) Include move comment on the null edit as well as the redirect
+* (bug 3990) Use existing session name if session.auto_start is on
+  Fixes checks for open sessions, such as the cookie warning on login.
+  Patch by Zbigniew Braniecki.
 
 
 === Caveats ===
index 705a719..d84ec66 100644 (file)
@@ -115,10 +115,15 @@ wfDebug( 'Main cache: ' . get_class( $wgMemc ) .
 wfProfileOut( $fname.'-memcached' );
 wfProfileIn( $fname.'-SetupSession' );
 
-if ( $wgDBprefix ) {
+# If session.auto_start is there, we can't touch session name
+#
+
+if (!ini_get('session.auto_start')) {
+    if ( $wgDBprefix ) {
        session_name( $wgDBname . '_' . $wgDBprefix . '_session' );
-} else {
+    } else {
        session_name( $wgDBname . '_session' );
+    }
 }
 
 if( !$wgCommandLineMode && ( isset( $_COOKIE[session_name()] ) || isset( $_COOKIE[$wgDBname.'Token'] ) ) ) {