$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 );
}
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 ) {
}
}
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
// Remove these to be safe
if ( isset( $wgTitle ) )
unset( $wgTitle );
- if ( isset( $wgArticle ) )
- unset( $wgArticle );
}
}