r88590 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88589‎ | r88590 | r88591 >
Date:18:05, 22 May 2011
Author:demon
Status:ok
Tags:
Comment:
$wgArticle ain't needed here either ;) (followup r88588)
Modified paths:
  • /trunk/phase3/maintenance/rebuildFileCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/rebuildFileCache.php
@@ -31,12 +31,9 @@
3232 $this->setBatchSize( 100 );
3333 }
3434
35 - /**
36 - * @todo MAKE $wgArticle GO AWAY! This is the absolute LAST use in core
37 - */
3835 public function execute() {
3936 global $wgUseFileCache, $wgDisableCounters, $wgContentNamespaces, $wgRequestTime;
40 - global $wgTitle, $wgArticle, $wgOut;
 37+ global $wgTitle, $wgOut;
4138 if ( !$wgUseFileCache ) {
4239 $this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true );
4340 }
@@ -83,9 +80,9 @@
8481 continue; // broken title?
8582 }
8683 $wgOut = $context->output; // set display title
87 - $wgArticle = new Article( $wgTitle );
 84+ $article = new Article( $wgTitle );
8885 // If the article is cacheable, then load it
89 - if ( $wgArticle->isFileCacheable() ) {
 86+ if ( $article->isFileCacheable() ) {
9087 $cache = new HTMLFileCache( $wgTitle );
9188 if ( $cache->isFileCacheGood() ) {
9289 if ( $overwrite ) {
@@ -96,8 +93,8 @@
9794 }
9895 }
9996 ob_start( array( &$cache, 'saveToFileCache' ) ); // save on ob_end_clean()
100 - $wgUseFileCache = false; // hack, we don't want $wgArticle fiddling with filecache
101 - $wgArticle->view();
 97+ $wgUseFileCache = false; // hack, we don't want $article fiddling with filecache
 98+ $article->view();
10299 @$wgOut->output(); // header notices
103100 $wgUseFileCache = true;
104101 ob_end_clean(); // clear buffer
@@ -119,8 +116,6 @@
120117 // Remove these to be safe
121118 if ( isset( $wgTitle ) )
122119 unset( $wgTitle );
123 - if ( isset( $wgArticle ) )
124 - unset( $wgArticle );
125120 }
126121 }
127122

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88588$wgArticle is deprecated! Possible removal in 1.20 or 1.21!...demon17:59, 22 May 2011

Status & tagging log