From c81910440751444f2cdc608a54f114d3f70c3137 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 7 Dec 2010 12:35:14 +0000 Subject: [PATCH] * 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 --- index.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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(); - -- 2.20.1