r77975 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77974‎ | r77975 | r77976 >
Date:12:35, 7 December 2010
Author:ialex
Status:ok
Tags:
Comment:
* 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
Modified paths:
  • /trunk/phase3/index.php (modified) (history)

Diff [purge]

Index: trunk/phase3/index.php
@@ -57,9 +57,6 @@
5858
5959 # Set title from request parameters
6060 $wgTitle = $mediaWiki->checkInitialQueries( $title, $action );
61 -if( $wgTitle === null ) {
62 - unset( $wgTitle );
63 -}
6461
6562 wfProfileOut( 'main-misc-setup' );
6663
@@ -74,7 +71,7 @@
7572 exit;
7673 }
7774
78 -if( $wgUseFileCache && isset( $wgTitle ) ) {
 75+if( $wgUseFileCache && $wgTitle !== null ) {
7976 wfProfileIn( 'main-try-filecache' );
8077 // Raw pages should handle cache control on their own,
8178 // even when using file cache. This reduces hits from clients.
@@ -89,7 +86,6 @@
9087 # Do any stats increment/watchlist stuff
9188 $wgArticle = MediaWiki::articleFromTitle( $wgTitle );
9289 $wgArticle->viewUpdates();
93 - # Tell $wgOut that output is taken care of
9490 wfProfileOut( 'main-try-filecache' );
9591 $mediaWiki->restInPeace();
9692 exit;
@@ -114,4 +110,3 @@
115111 $mediaWiki->finalCleanup( $wgOut );
116112
117113 $mediaWiki->restInPeace();
118 -

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r12612Moving more stuff to Wiki.phpmagnus_manske19:33, 11 January 2006
r45126FileCache tweaks:...aaron15:03, 28 December 2008

Status & tagging log