$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' );
MediaWiki\suppressWarnings(); // header notices
// Cache ?action=view
- $wgRequestTime = microtime( true ); # bug 22852
+ $wgRequestTime = microtime( true ); # T24852
ob_start();
$article->view();
$context->getOutput()->output();
$viewHtml = ob_get_clean();
$viewCache->saveToFileCache( $viewHtml );
// Cache ?action=history
- $wgRequestTime = microtime( true ); # bug 22852
+ $wgRequestTime = microtime( true ); # T24852
ob_start();
Action::factory( 'history', $article, $context )->show();
$context->getOutput()->output();