Fix for issue noted on CR r64876: fatal error on CSS/JS subpage display
[lhc/web/wiklou.git] / includes / RawPage.php
index 3e38144..8e515af 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Copyright (C) 2004 Gabriel Wicke <wicke@wikidev.net>
  * http://wikidev.net/
- * Based on PageHistory and SpecialExport
+ * Based on HistoryPage and SpecialExport
  *
  * License: GPL (http://www.gnu.org/copyleft/gpl.html)
  *
@@ -135,7 +135,8 @@ class RawPage {
                $mode = $this->mPrivateCache ? 'private' : 'public';
                header( 'Cache-Control: '.$mode.', s-maxage='.$this->mSmaxage.', max-age='.$this->mMaxage );
                
-               if( HTMLFileCache::useFileCache() ) {
+               global $wgUseFileCache;
+               if( $wgUseFileCache and HTMLFileCache::useFileCache() ) {
                        $cache = new HTMLFileCache( $this->mTitle, 'raw' );
                        if( $cache->isFileCacheGood( /* Assume up to date */ ) ) {
                                $cache->loadFromFileCache();