jenkins-bot has submitted this change and it was merged.
Change subject: Remove SpecialSearchNoResults and call SpecialSearchResults
always
......................................................................
Remove SpecialSearchNoResults and call SpecialSearchResults always
The former hook is only used by one extension which uses the
same code path for both hooks meaning no fix is necessary. Makes
it possible for extensions to actually provide results when none
were found.
Change-Id: Ia4d56b2a1a7531529dbde8a011a33a4482c04932
---
M RELEASE-NOTES-1.24
M docs/hooks.txt
M includes/specials/SpecialSearch.php
3 files changed, 4 insertions(+), 9 deletions(-)
Approvals:
Manybubbles: Looks good to me, approved
jenkins-bot: Verified
diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 4ae33e3..1205cebe 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -430,6 +430,8 @@
Running update.php on MySQL < v5.1 may result in heavy processing.
* RSS and Atom feeds generated by MediaWiki no longer include a fallback
stylesheet. It was ignored by most browsers these days anyway.
+* SpecialSearchNoResults hook has been removed. SpecialSearchResults is now
+ called unconditionally.
==== Renamed classes ====
* CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 65b1675..ad5377e 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2513,15 +2513,10 @@
$output: $wgOut
$term: Search term specified by the user
-'SpecialSearchResults': Called before search result display when there are
-matches.
+'SpecialSearchResults': Called before search result display
$term: string of search term
&$titleMatches: empty or SearchResultSet object
&$textMatches: empty or SearchResultSet object
-
-'SpecialSearchNoResults': Called before search result display when there are no
-matches.
-$term: string of search term
'SpecialStatsAddExtra': Add extra statistic at the end of Special:Statistics.
&$extraStats: Array to save the new stats
diff --git a/includes/specials/SpecialSearch.php
b/includes/specials/SpecialSearch.php
index 59d65bc..3407476 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -367,10 +367,8 @@
$this->limit + $this->offset >=
$totalRes
);
}
- wfRunHooks( 'SpecialSearchResults', array( $term,
&$titleMatches, &$textMatches ) );
- } else {
- wfRunHooks( 'SpecialSearchNoResults', array( $term ) );
}
+ wfRunHooks( 'SpecialSearchResults', array( $term,
&$titleMatches, &$textMatches ) );
$out->parserOptions()->setEditSection( false );
if ( $titleMatches ) {
--
To view, visit https://gerrit.wikimedia.org/r/156725
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4d56b2a1a7531529dbde8a011a33a4482c04932
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits