summaryrefslogtreecommitdiff
path: root/maintenance/rebuildFileCache.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-12-27 15:41:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-12-31 11:43:28 +0100
commitc1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch)
tree2b38796e738dd74cb42ecd9bfd151803108386bc /maintenance/rebuildFileCache.php
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Update to MediaWiki 1.24.1
Diffstat (limited to 'maintenance/rebuildFileCache.php')
-rw-r--r--maintenance/rebuildFileCache.php17
1 files changed, 6 insertions, 11 deletions
diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php
index 12ed9fac..6ce54b9f 100644
--- a/maintenance/rebuildFileCache.php
+++ b/maintenance/rebuildFileCache.php
@@ -49,7 +49,7 @@ class RebuildFileCache extends Maintenance {
public function execute() {
global $wgUseFileCache, $wgReadOnly, $wgContentNamespaces, $wgRequestTime;
- global $wgTitle, $wgOut;
+ global $wgOut;
if ( !$wgUseFileCache ) {
$this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true );
}
@@ -104,22 +104,22 @@ class RebuildFileCache extends Maintenance {
$rebuilt = false;
$wgRequestTime = microtime( true ); # bug 22852
- $wgTitle = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
- if ( null == $wgTitle ) {
+ $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
+ if ( null == $title ) {
$this->output( "Page {$row->page_id} has bad title\n" );
continue; // broken title?
}
$context = new RequestContext;
- $context->setTitle( $wgTitle );
- $article = Article::newFromTitle( $wgTitle, $context );
+ $context->setTitle( $title );
+ $article = Article::newFromTitle( $title, $context );
$context->setWikiPage( $article->getPage() );
$wgOut = $context->getOutput(); // set display title
// If the article is cacheable, then load it
if ( $article->isFileCacheable() ) {
- $cache = HTMLFileCache::newFromTitle( $wgTitle, 'view' );
+ $cache = HTMLFileCache::newFromTitle( $title, 'view' );
if ( $cache->isCacheGood() ) {
if ( $overwrite ) {
$rebuilt = true;
@@ -151,11 +151,6 @@ class RebuildFileCache extends Maintenance {
$blockEnd += $this->mBatchSize;
}
$this->output( "Done!\n" );
-
- // Remove these to be safe
- if ( isset( $wgTitle ) ) {
- unset( $wgTitle );
- }
}
}