From f32f31613c5695be7f450632ed6d93c12430882d Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 10 May 2014 11:20:07 +0200 Subject: [PATCH] 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 --- includes/Setup.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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' ); -- 2.20.1