Followup r75753, combine these into one if block
This commit is contained in:
parent
69bf3a3cb0
commit
82f3f815fa
1 changed files with 8 additions and 10 deletions
|
|
@ -307,16 +307,14 @@ $wgCookiePrefix = strtr($wgCookiePrefix, "=,; +.\"'\\[", "__________");
|
|||
if( !wfIniGetBool( 'session.auto_start' ) )
|
||||
session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' );
|
||||
|
||||
if( !defined( 'MW_NO_SESSION' ) ) {
|
||||
if ( !$wgCommandLineMode ) {
|
||||
if( ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix.'Token'] ) ) ) {
|
||||
wfIncrStats( 'request_with_session' );
|
||||
wfSetupSession();
|
||||
$wgSessionStarted = true;
|
||||
} else {
|
||||
wfIncrStats( 'request_without_session' );
|
||||
$wgSessionStarted = false;
|
||||
}
|
||||
if( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
|
||||
if( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix.'Token'] ) ) {
|
||||
wfIncrStats( 'request_with_session' );
|
||||
wfSetupSession();
|
||||
$wgSessionStarted = true;
|
||||
} else {
|
||||
wfIncrStats( 'request_without_session' );
|
||||
$wgSessionStarted = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue