From 2433320259db508394435db96630f0dca1e87544 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Sun, 22 May 2011 18:05:17 +0000 Subject: [PATCH] $wgArticle ain't needed here either ;) (followup r88588) --- maintenance/rebuildFileCache.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php index aa1bbbb044..82112ef173 100644 --- a/maintenance/rebuildFileCache.php +++ b/maintenance/rebuildFileCache.php @@ -31,12 +31,9 @@ class RebuildFileCache extends Maintenance { $this->setBatchSize( 100 ); } - /** - * @todo MAKE $wgArticle GO AWAY! This is the absolute LAST use in core - */ public function execute() { global $wgUseFileCache, $wgDisableCounters, $wgContentNamespaces, $wgRequestTime; - global $wgTitle, $wgArticle, $wgOut; + global $wgTitle, $wgOut; if ( !$wgUseFileCache ) { $this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true ); } @@ -83,9 +80,9 @@ class RebuildFileCache extends Maintenance { continue; // broken title? } $wgOut = $context->output; // set display title - $wgArticle = new Article( $wgTitle ); + $article = new Article( $wgTitle ); // If the article is cacheable, then load it - if ( $wgArticle->isFileCacheable() ) { + if ( $article->isFileCacheable() ) { $cache = new HTMLFileCache( $wgTitle ); if ( $cache->isFileCacheGood() ) { if ( $overwrite ) { @@ -96,8 +93,8 @@ class RebuildFileCache extends Maintenance { } } ob_start( array( &$cache, 'saveToFileCache' ) ); // save on ob_end_clean() - $wgUseFileCache = false; // hack, we don't want $wgArticle fiddling with filecache - $wgArticle->view(); + $wgUseFileCache = false; // hack, we don't want $article fiddling with filecache + $article->view(); @$wgOut->output(); // header notices $wgUseFileCache = true; ob_end_clean(); // clear buffer @@ -119,8 +116,6 @@ class RebuildFileCache extends Maintenance { // Remove these to be safe if ( isset( $wgTitle ) ) unset( $wgTitle ); - if ( isset( $wgArticle ) ) - unset( $wgArticle ); } } -- 2.20.1