Don't set the session name in CLI or when sessions are deactivated
It doesn't make much sense to set the session name in that case. Change-Id: I4cf237d79061d146091c3409b7ac3e19136f3fb6
This commit is contained in:
parent
cefa3c4941
commit
e71939297e
1 changed files with 8 additions and 8 deletions
|
|
@ -558,15 +558,15 @@ wfRunHooks( 'SetupAfterCache' );
|
|||
|
||||
wfProfileIn( $fname . '-session' );
|
||||
|
||||
// If session.auto_start is there, we can't touch session name
|
||||
if ( !wfIniGetBool( 'session.auto_start' ) ) {
|
||||
session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' );
|
||||
}
|
||||
if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
|
||||
// If session.auto_start is there, we can't touch session name
|
||||
if ( !wfIniGetBool( 'session.auto_start' ) ) {
|
||||
session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' );
|
||||
}
|
||||
|
||||
if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode &&
|
||||
( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) )
|
||||
) {
|
||||
wfSetupSession();
|
||||
if ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) ) {
|
||||
wfSetupSession();
|
||||
}
|
||||
}
|
||||
|
||||
wfProfileOut( $fname . '-session' );
|
||||
|
|
|
|||
Loading…
Reference in a new issue