Remove $wgSessionStarted
authorAlexandre Emsenhuber <mediawiki@emsenhuber.ch>
Sat, 10 May 2014 09:20:07 +0000 (11:20 +0200)
committerAlexandre Emsenhuber <mediawiki@emsenhuber.ch>
Sat, 10 May 2014 14:29:02 +0000 (16:29 +0200)
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

index 18d1e33..391bc13 100644 (file)
@@ -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' );