diff options
author | Aaron Schulz <aaron@users.mediawiki.org> | 2011-09-29 08:18:20 +0000 |
---|---|---|
committer | Aaron Schulz <aaron@users.mediawiki.org> | 2011-09-29 08:18:20 +0000 |
commit | 6014f0db91a823a5c02b545c0d589408a307e77f (patch) | |
tree | fa89db4b1e9c39f1e646ca4a9c96a89a17775b28 /maintenance/rebuildFileCache.php | |
parent | 32327650c5e7e73e392ae3b3a97d97650d4fb0af (diff) | |
download | mediawikicore-6014f0db91a823a5c02b545c0d589408a307e77f.tar.gz mediawikicore-6014f0db91a823a5c02b545c0d589408a307e77f.zip |
HTMLFileCache refactoring:
* Rewrote class and split into three classes: a base class, and html cache and a more generic cache to be used later.
* The new classes now use RequestContext.
* Renamed fetchPageText() -> fetchText().
* Split out new saveText() function from saveToFileCache().
* Various other cleanups and fixes.
Also fixed backwards setting of $wgDisableCounters in rebuildFileCache.php.
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/98405
Diffstat (limited to 'maintenance/rebuildFileCache.php')
-rw-r--r-- | maintenance/rebuildFileCache.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php index 84ada11c95d5..d5a3de66641a 100644 --- a/maintenance/rebuildFileCache.php +++ b/maintenance/rebuildFileCache.php @@ -37,7 +37,7 @@ class RebuildFileCache extends Maintenance { if ( !$wgUseFileCache ) { $this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true ); } - $wgDisableCounters = false; + $wgDisableCounters = true; $start = $this->getArg( 0, "0" ); if ( !ctype_digit( $start ) ) { $this->error( "Invalid value for start parameter.", true ); @@ -83,8 +83,8 @@ class RebuildFileCache extends Maintenance { $article = new Article( $wgTitle ); // If the article is cacheable, then load it if ( $article->isFileCacheable() ) { - $cache = new HTMLFileCache( $wgTitle ); - if ( $cache->isFileCacheGood() ) { + $cache = HTMLFileCache::newFromTitle( $wgTitle, 'view' ); + if ( $cache->isCacheGood() ) { if ( $overwrite ) { $rebuilt = true; } else { |