From: Chad Horohoe Date: Sun, 22 May 2011 18:05:17 +0000 (+0000) Subject: $wgArticle ain't needed here either ;) (followup r88588) X-Git-Tag: 1.31.0-rc.0~30011 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=2433320259db508394435db96630f0dca1e87544;p=lhc%2Fweb%2Fwiklou.git $wgArticle ain't needed here either ;) (followup r88588) --- 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 ); } }