Chad has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/141067

Change subject: Remove SearchGetNearMatchBefore hook, unused
......................................................................

Remove SearchGetNearMatchBefore hook, unused

Change-Id: I320ea989e74a8ba85705046968a99349988cf3cf
---
M RELEASE-NOTES-1.24
M docs/hooks.txt
M includes/search/SearchEngine.php
3 files changed, 1 insertion(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/67/141067/1

diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 58e39d5..c7641b4 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -167,6 +167,7 @@
   skin style files used by the module.
 * Removed getLang() from IContextSource and subclasses. (deprecated since 1.19)
 * SearchEngineReplacePrefixesComplete hook was removed.
+* SearchGetNearMatchBefore hook was removed.
 
 ==== Renamed classes ====
 * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
diff --git a/docs/hooks.txt b/docs/hooks.txt
index bb5bbec..630a779 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2161,11 +2161,6 @@
 $flags: a comma-delimited list of strings representing the options used.  May
   include: utf8 (this will always be set for new revisions); gzip; external.
 
-'SearchGetNearMatchBefore': Perform exact-title-matches in "go" searches before
-the normal operations.
-$allSearchTerms : Array of the search terms in all content languages
-&$titleResult : Outparam; the value to return. A Title object or null.
-
 'SearchAfterNoDirectMatch': If there was no match for the exact result. This
 runs before lettercase variants are attempted, whereas 'SearchGetNearMatch'
 runs after.
diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index f83fae1..621eb3c 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -166,11 +166,6 @@
                        );
                }
 
-               $titleResult = null;
-               if ( !wfRunHooks( 'SearchGetNearMatchBefore', array( 
$allSearchTerms, &$titleResult ) ) ) {
-                       return $titleResult;
-               }
-
                foreach ( $allSearchTerms as $term ) {
 
                        # Exact match? No need to look further.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I320ea989e74a8ba85705046968a99349988cf3cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to