r75781 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75780‎ | r75781 | r75782 >
Date:11:50, 1 November 2010
Author:demon
Status:ok
Tags:
Comment:
Followup r75753, combine these into one if block
Modified paths:
  • /trunk/phase3/includes/Setup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Setup.php
@@ -307,16 +307,14 @@
308308 if( !wfIniGetBool( 'session.auto_start' ) )
309309 session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' );
310310
311 -if( !defined( 'MW_NO_SESSION' ) ) {
312 - if ( !$wgCommandLineMode ) {
313 - if( ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix.'Token'] ) ) ) {
314 - wfIncrStats( 'request_with_session' );
315 - wfSetupSession();
316 - $wgSessionStarted = true;
317 - } else {
318 - wfIncrStats( 'request_without_session' );
319 - $wgSessionStarted = false;
320 - }
 311+if( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
 312+ if( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix.'Token'] ) ) {
 313+ wfIncrStats( 'request_with_session' );
 314+ wfSetupSession();
 315+ $wgSessionStarted = true;
 316+ } else {
 317+ wfIncrStats( 'request_without_session' );
 318+ $wgSessionStarted = false;
321319 }
322320 }
323321

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75753Don't increment stats when called from the scripts....platonides22:25, 31 October 2010

Status & tagging log