Add attributes parameter to ShowSearchHitTitle
[lhc/web/wiklou.git] / includes / widget / search / FullSearchResultWidget.php
index a93e1fc..4c98399 100644 (file)
@@ -131,16 +131,17 @@ class FullSearchResultWidget implements SearchResultWidget {
 
                // 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;