Merge "Unbreak extensions using SpecialSearchResults hook"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 18 Jan 2017 22:44:01 +0000 (22:44 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 18 Jan 2017 22:44:02 +0000 (22:44 +0000)
docs/hooks.txt
includes/specials/SpecialSearch.php

index a000bb1..c5b112d 100644 (file)
@@ -3148,8 +3148,8 @@ $opts: Array: key => value of hidden options for inclusion in custom forms
 
 'SpecialSearchResults': Called before search result display
 $term: string of search term
-$titleMatches: empty or SearchResultSet object
-$textMatches: empty or SearchResultSet object
+&$titleMatches: empty or SearchResultSet object
+&$textMatches: empty or SearchResultSet object
 
 'SpecialSearchResultsPrepend': Called immediately before returning HTML
 on the search results page.  Useful for including an external search
index 9356a3a..34620ff 100644 (file)
@@ -371,7 +371,7 @@ class SpecialSearch extends SpecialPage {
                // Show the create link ahead
                $this->showCreateLink( $title, $num, $titleMatches, $textMatches );
 
-               Hooks::run( 'SpecialSearchResults', [ $term, $titleMatches, $textMatches ] );
+               Hooks::run( 'SpecialSearchResults', [ $term, &$titleMatches, &$textMatches ] );
 
                // If we have no results and have not already displayed an error message
                if ( $num === 0 && !$hasErrors ) {