From: Chad Horohoe Date: Wed, 18 Jan 2017 22:21:36 +0000 (-0800) Subject: Unbreak extensions using SpecialSearchResults hook X-Git-Tag: 1.31.0-rc.0~4290^2 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=8bf6de3042e948782c81e729e1b0169c0b0912c8;p=lhc%2Fweb%2Fwiklou.git Unbreak extensions using SpecialSearchResults hook Changing hook signatures with no deprecation period is a no-no. Fixes Ib527fc3a3c39eb2e56985e5d1e4905fc4562353c Reverts I153a7d590faceb1e2c4fe7d95a5cb931cda0c301 Bug: T155625 Change-Id: I2b408691fc4435ef24fc62360bd7ad6114f385c7 --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 4057cce20d..ef472187ad 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 9356a3a4f7..34620ff9e2 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -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 ) {