Index: trunk/phase3/index.php |
— | — | @@ -57,6 +57,7 @@ |
58 | 58 | $action = $wgRequest->getVal( 'action', 'view' ); |
59 | 59 | $title = $wgRequest->getVal( 'title' ); |
60 | 60 | |
| 61 | +# Set title from request parameters |
61 | 62 | $wgTitle = $mediaWiki->checkInitialQueries( $title, $action ); |
62 | 63 | if( $wgTitle === NULL ) { |
63 | 64 | unset( $wgTitle ); |
— | — | @@ -80,26 +81,20 @@ |
81 | 82 | // Raw pages should handle cache control on their own, |
82 | 83 | // even when using file cache. This reduces hits from clients. |
83 | 84 | 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(); |
103 | 91 | } |
| 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; |
104 | 99 | } |
105 | 100 | } |
106 | 101 | wfProfileOut( 'main-try-filecache' ); |