From 82f3f815fa5f9824ce7f58434e3d11757e23e15d Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 1 Nov 2010 11:50:00 +0000 Subject: [PATCH] Followup r75753, combine these into one if block --- includes/Setup.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/includes/Setup.php b/includes/Setup.php index 732e46c8ec..d78aade74a 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -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; } } -- 2.20.1