r55162 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55161‎ | r55162 | r55163 >
Date:02:25, 17 August 2009
Author:aaron
Status:ok
Tags:
Comment:
reverted r55161 - not needed
Modified paths:
  • /trunk/phase3/index.php (modified) (history)

Diff [purge]

Index: trunk/phase3/index.php
@@ -57,6 +57,7 @@
5858 $action = $wgRequest->getVal( 'action', 'view' );
5959 $title = $wgRequest->getVal( 'title' );
6060
 61+# Set title from request parameters
6162 $wgTitle = $mediaWiki->checkInitialQueries( $title, $action );
6263 if( $wgTitle === NULL ) {
6364 unset( $wgTitle );
@@ -80,26 +81,20 @@
8182 // Raw pages should handle cache control on their own,
8283 // even when using file cache. This reduces hits from clients.
8384 if( $action != 'raw' && HTMLFileCache::useFileCache() ) {
84 - /* Set the title from the page ID if needed... */
85 - if( $curid = $wgRequest->getInt('curid') ) {
86 - $wgTitle = Title::newFromID( $curid );
87 - }
88 - if( !is_null($wgTitle) ) {
89 - /* Try low-level file cache hit */
90 - $cache = new HTMLFileCache( $wgTitle, $action );
91 - if( $cache->isFileCacheGood( /* Assume up to date */ ) ) {
92 - /* Check incoming headers to see if client has this cached */
93 - if( !$wgOut->checkLastModified( $cache->fileCacheTime() ) ) {
94 - $cache->loadFromFileCache();
95 - }
96 - # Do any stats increment/watchlist stuff
97 - $wgArticle = MediaWiki::articleFromTitle( $wgTitle );
98 - $wgArticle->viewUpdates();
99 - # Tell $wgOut that output is taken care of
100 - wfProfileOut( 'main-try-filecache' );
101 - $mediaWiki->restInPeace();
102 - exit;
 85+ /* Try low-level file cache hit */
 86+ $cache = new HTMLFileCache( $wgTitle, $action );
 87+ if( $cache->isFileCacheGood( /* Assume up to date */ ) ) {
 88+ /* Check incoming headers to see if client has this cached */
 89+ if( !$wgOut->checkLastModified( $cache->fileCacheTime() ) ) {
 90+ $cache->loadFromFileCache();
10391 }
 92+ # Do any stats increment/watchlist stuff
 93+ $wgArticle = MediaWiki::articleFromTitle( $wgTitle );
 94+ $wgArticle->viewUpdates();
 95+ # Tell $wgOut that output is taken care of
 96+ wfProfileOut( 'main-try-filecache' );
 97+ $mediaWiki->restInPeace();
 98+ exit;
10499 }
105100 }
106101 wfProfileOut( 'main-try-filecache' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r55161Fixed html filecache handling of ?curid urlsaaron01:54, 17 August 2009

Status & tagging log