function returned false.
'ShowSearchHitTitle': Customise display of search hit title/link.
-$title: Title to link to
+&$title: Title to link to
&$text: Text to use for the link
$result: The search result
$terms: The search terms entered
$queryString = [];
Hooks::run( 'ShowSearchHitTitle',
- [ $title, &$snippet, $result, $terms, $this->specialPage, &$queryString ] );
+ [ &$title, &$snippet, $result, $terms, $this->specialPage, &$queryString ] );
$link = $this->linkRenderer->makeLink(
$title,
$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' );