Merge "InstantCommons: do not cache thumbs"
[lhc/web/wiklou.git] / maintenance / rebuildFileCache.php
index 2287559..d073282 100644 (file)
@@ -96,7 +96,6 @@ class RebuildFileCache extends Maintenance {
                $blockEnd = $start + $this->mBatchSize - 1;
 
                $dbw = $this->getDB( DB_MASTER );
-               $mainContext = RequestContext::getMain();
                // Go through each page and save the output
                while ( $blockEnd <= $end ) {
                        // Get the pages
@@ -123,6 +122,9 @@ class RebuildFileCache extends Maintenance {
                                $article = Article::newFromTitle( $title, $context );
                                $context->setWikiPage( $article->getPage() );
 
+                               // Some extensions like FlaggedRevs while error out if this is unset
+                               RequestContext::getMain()->setTitle( $title );
+
                                // If the article is cacheable, then load it
                                if ( $article->isFileCacheable( HTMLFileCache::MODE_REBUILD ) ) {
                                        $viewCache = new HTMLFileCache( $title, 'view' );