http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88590
Revision: 88590 Author: demon Date: 2011-05-22 18:05:17 +0000 (Sun, 22 May 2011) Log Message: ----------- $wgArticle ain't needed here either ;) (followup r88588) Modified Paths: -------------- trunk/phase3/maintenance/rebuildFileCache.php Modified: trunk/phase3/maintenance/rebuildFileCache.php =================================================================== --- trunk/phase3/maintenance/rebuildFileCache.php 2011-05-22 18:00:48 UTC (rev 88589) +++ trunk/phase3/maintenance/rebuildFileCache.php 2011-05-22 18:05:17 UTC (rev 88590) @@ -31,12 +31,9 @@ $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 @@ 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 @@ } } 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 @@ // Remove these to be safe if ( isset( $wgTitle ) ) unset( $wgTitle ); - if ( isset( $wgArticle ) ) - unset( $wgArticle ); } } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs