From: Brion Vibber Date: Sun, 15 Jan 2006 08:05:28 +0000 (+0000) Subject: * (bug 3990) Use existing session name if session.auto_start is on X-Git-Tag: 1.6.0~533 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=6adf79ec39a7d2dc3db881186e2ee393d4c7f2f1;p=lhc%2Fweb%2Fwiklou.git * (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. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c0cbe8e14b..16b80bdc2f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/Setup.php b/includes/Setup.php index 705a719015..d84ec66f6e 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -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'] ) ) ) {