Index: trunk/phase3/maintenance/rebuildFileCache.php |
— | — | @@ -31,12 +31,9 @@ |
32 | 32 | $this->setBatchSize( 100 ); |
33 | 33 | } |
34 | 34 | |
35 | | - /** |
36 | | - * @todo MAKE $wgArticle GO AWAY! This is the absolute LAST use in core |
37 | | - */ |
38 | 35 | public function execute() { |
39 | 36 | global $wgUseFileCache, $wgDisableCounters, $wgContentNamespaces, $wgRequestTime; |
40 | | - global $wgTitle, $wgArticle, $wgOut; |
| 37 | + global $wgTitle, $wgOut; |
41 | 38 | if ( !$wgUseFileCache ) { |
42 | 39 | $this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true ); |
43 | 40 | } |
— | — | @@ -83,9 +80,9 @@ |
84 | 81 | continue; // broken title? |
85 | 82 | } |
86 | 83 | $wgOut = $context->output; // set display title |
87 | | - $wgArticle = new Article( $wgTitle ); |
| 84 | + $article = new Article( $wgTitle ); |
88 | 85 | // If the article is cacheable, then load it |
89 | | - if ( $wgArticle->isFileCacheable() ) { |
| 86 | + if ( $article->isFileCacheable() ) { |
90 | 87 | $cache = new HTMLFileCache( $wgTitle ); |
91 | 88 | if ( $cache->isFileCacheGood() ) { |
92 | 89 | if ( $overwrite ) { |
— | — | @@ -96,8 +93,8 @@ |
97 | 94 | } |
98 | 95 | } |
99 | 96 | 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(); |
102 | 99 | @$wgOut->output(); // header notices |
103 | 100 | $wgUseFileCache = true; |
104 | 101 | ob_end_clean(); // clear buffer |
— | — | @@ -119,8 +116,6 @@ |
120 | 117 | // Remove these to be safe |
121 | 118 | if ( isset( $wgTitle ) ) |
122 | 119 | unset( $wgTitle ); |
123 | | - if ( isset( $wgArticle ) ) |
124 | | - unset( $wgArticle ); |
125 | 120 | } |
126 | 121 | } |
127 | 122 | |