jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/332884 )

Change subject: Unbreak extensions using SpecialSearchResults hook
......................................................................


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
---
M docs/hooks.txt
M includes/specials/SpecialSearch.php
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/docs/hooks.txt b/docs/hooks.txt
index 4057cce..ef47218 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -3148,8 +3148,8 @@
 
 '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 9356a3a..34620ff 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -371,7 +371,7 @@
                // 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 ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/332884
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b408691fc4435ef24fc62360bd7ad6114f385c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to