if ( !Hooks::run( 'ShowSearchHit', [
$this->specialPage, $result, $terms,
&$link, &$redirect, &$section, &$extract,
- &$score, &$size, &$date, &$related, &$html
+ &$score, &$desc, &$date, &$related, &$html
] ) ) {
return $html;
}
// clone to prevent hook from changing the title stored inside $result
$title = clone $result->getTitle();
- $queryString = [];
+ $query = [];
+ $attributes = [ 'data-serp-pos' => $position ];
Hooks::run( 'ShowSearchHitTitle',
- [ &$title, &$snippet, $result, $terms, $this->specialPage, &$queryString ] );
+ [ &$title, &$snippet, $result, $terms, $this->specialPage, &$query, &$attributes ] );
$link = $this->linkRenderer->makeLink(
$title,
$snippet,
- [ 'data-serp-pos' => $position ],
- $queryString
+ $attributes,
+ $query
);
return $link;
: $this->linkRenderer->makeLink( $title, $text ? new HtmlArmor( $text ) : null );
return "<span class='searchalttitle'>" .
- $this->specialPage->msg( $msgKey )->rawParams( $inner )->text()
+ $this->specialPage->msg( $msgKey )->rawParams( $inner )->parse()
. "</span>";
}