From: Alexandre Emsenhuber Date: Tue, 7 Dec 2010 12:35:14 +0000 (+0000) Subject: * Don't unset $wgTitle if it's null, just let it as is so that the variable is always... X-Git-Tag: 1.31.0-rc.0~33485 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=c81910440751444f2cdc608a54f114d3f70c3137;p=lhc%2Fweb%2Fwiklou.git * Don't unset $wgTitle if it's null, just let it as is so that the variable is always defined (it is already set to null in in Setup.php). It was added in r12612 when all the code that set $wgTitle was moved in MediaWiki::checkInitialQueries() * Removed comment that documented a line removed in r45126 --- diff --git a/index.php b/index.php index 020e94d9dc..9f4dedd795 100644 --- a/index.php +++ b/index.php @@ -57,9 +57,6 @@ $title = $wgRequest->getVal( 'title' ); # Set title from request parameters $wgTitle = $mediaWiki->checkInitialQueries( $title, $action ); -if( $wgTitle === null ) { - unset( $wgTitle ); -} wfProfileOut( 'main-misc-setup' ); @@ -74,7 +71,7 @@ if( $wgUseAjax && $action == 'ajax' ) { exit; } -if( $wgUseFileCache && isset( $wgTitle ) ) { +if( $wgUseFileCache && $wgTitle !== null ) { wfProfileIn( 'main-try-filecache' ); // Raw pages should handle cache control on their own, // even when using file cache. This reduces hits from clients. @@ -89,7 +86,6 @@ if( $wgUseFileCache && isset( $wgTitle ) ) { # Do any stats increment/watchlist stuff $wgArticle = MediaWiki::articleFromTitle( $wgTitle ); $wgArticle->viewUpdates(); - # Tell $wgOut that output is taken care of wfProfileOut( 'main-try-filecache' ); $mediaWiki->restInPeace(); exit; @@ -114,4 +110,3 @@ $mediaWiki->performRequestForTitle( $wgTitle, $wgArticle, $wgOut, $wgUser, $wgRe $mediaWiki->finalCleanup( $wgOut ); $mediaWiki->restInPeace(); -