From: Aaron Schulz Date: Wed, 18 Jan 2017 06:10:03 +0000 (-0800) Subject: Avoid fatal error with FlaggedRevs when running rebuildFileCache.php X-Git-Tag: 1.31.0-rc.0~4292^2 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=98fe37cabdb2ca693624072b1db6dd14fa60c7a8;p=lhc%2Fweb%2Fwiklou.git Avoid fatal error with FlaggedRevs when running rebuildFileCache.php Change-Id: I8d335c64cfc74a227528fbd85d333eaaa8157f41 --- diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php index da8a6bc36d..d073282d96 100644 --- a/maintenance/rebuildFileCache.php +++ b/maintenance/rebuildFileCache.php @@ -122,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' );