From: Domas Mituzas Date: Tue, 8 Sep 2009 18:00:48 +0000 (+0000) Subject: move the checks for file cache way up, right where it belongs X-Git-Tag: 1.31.0-rc.0~39839 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=2514d1f1955ea29109120ae768584ff18e22c30c;p=lhc%2Fweb%2Fwiklou.git move the checks for file cache way up, right where it belongs --- diff --git a/includes/Article.php b/includes/Article.php index 82b52dd34f..85a331e87d 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -726,7 +726,7 @@ class Article { public function view() { global $wgUser, $wgOut, $wgRequest, $wgContLang; global $wgEnableParserCache, $wgStylePath, $wgParser; - global $wgUseTrackbacks; + global $wgUseTrackbacks, $wgUseFileCache; wfProfileIn( __METHOD__ ); @@ -752,7 +752,7 @@ class Article { wfProfileOut( __METHOD__ ); return; # Try file cache - } else if( $this->tryFileCache() ) { + } else if( $wgUseFileCache && $this->tryFileCache() ) { wfDebug( __METHOD__.": done file cache\n" ); # tell wgOut that output is taken care of $wgOut->disable(); @@ -3520,8 +3520,7 @@ class Article { */ public function isFileCacheable() { $cacheable = false; - global $wgUseFileCache; - if( $wgUseFileCache and HTMLFileCache::useFileCache() ) { + if( HTMLFileCache::useFileCache() ) { $cacheable = $this->getID() && !$this->mRedirectedFrom; // Extension may have reason to disable file caching on some pages. if( $cacheable ) {