From: Alexandre Emsenhuber Date: Sat, 10 May 2014 09:20:07 +0000 (+0200) Subject: Remove $wgSessionStarted X-Git-Tag: 1.31.0-rc.0~15768^2 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=f32f31613c5695be7f450632ed6d93c12430882d;p=lhc%2Fweb%2Fwiklou.git Remove $wgSessionStarted This variable is useless since there is the check "session_id() !== ''" to do the same, that works correctly if the session has been started during the request. Change-Id: I5081e79e30e01c97aa0e59b106cc75e9d1ba951a --- diff --git a/includes/Setup.php b/includes/Setup.php index 18d1e337e4..391bc13ff3 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -551,13 +551,10 @@ if ( !wfIniGetBool( 'session.auto_start' ) ) { session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' ); } -if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) { - if ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) ) { - wfSetupSession(); - $wgSessionStarted = true; - } else { - $wgSessionStarted = false; - } +if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode && + ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) ) +) { + wfSetupSession(); } wfProfileOut( $fname . '-session' );