r56050 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56049‎ | r56050 | r56051 >
Date:18:00, 8 September 2009
Author:midom
Status:ok
Tags:
Comment:
move the checks for file cache way up, right where it belongs
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -726,7 +726,7 @@
727727 public function view() {
728728 global $wgUser, $wgOut, $wgRequest, $wgContLang;
729729 global $wgEnableParserCache, $wgStylePath, $wgParser;
730 - global $wgUseTrackbacks;
 730+ global $wgUseTrackbacks, $wgUseFileCache;
731731
732732 wfProfileIn( __METHOD__ );
733733
@@ -752,7 +752,7 @@
753753 wfProfileOut( __METHOD__ );
754754 return;
755755 # Try file cache
756 - } else if( $this->tryFileCache() ) {
 756+ } else if( $wgUseFileCache && $this->tryFileCache() ) {
757757 wfDebug( __METHOD__.": done file cache\n" );
758758 # tell wgOut that output is taken care of
759759 $wgOut->disable();
@@ -3520,8 +3520,7 @@
35213521 */
35223522 public function isFileCacheable() {
35233523 $cacheable = false;
3524 - global $wgUseFileCache;
3525 - if( $wgUseFileCache and HTMLFileCache::useFileCache() ) {
 3524+ if( HTMLFileCache::useFileCache() ) {
35263525 $cacheable = $this->getID() && !$this->mRedirectedFrom;
35273526 // Extension may have reason to disable file caching on some pages.
35283527 if( $cacheable ) {

Status & tagging log