Followup r75753, combine these into one if block

This commit is contained in:
Chad Horohoe 2010-11-01 11:50:00 +00:00
parent 69bf3a3cb0
commit 82f3f815fa

View file

@ -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;
}
}