Chad has uploaded a new change for review.

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

Change subject: Remove SearchEngineReplacePrefixesComplete hook
......................................................................

Remove SearchEngineReplacePrefixesComplete hook

This hook is poorly thought out. The only extension that uses it
can't possibly think it works how they're expecting.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/141066/1

diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index 20c7000..58e39d5 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -166,6 +166,7 @@
 * ResourceLoaderFileModule#getAllStyleFiles now returns all style files and all
   skin style files used by the module.
 * Removed getLang() from IContextSource and subclasses. (deprecated since 1.19)
+* SearchEngineReplacePrefixesComplete hook was removed.
 
 ==== Renamed classes ====
 * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 4c2fd89..bb5bbec 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2182,12 +2182,6 @@
 $term : Search term string
 &$title : Current Title object that is being returned (null if none found).
 
-'SearchEngineReplacePrefixesComplete': Run after 
SearchEngine::replacePrefixes().
-$searchEngine : The SearchEngine object. Users of this hooks will be interested
-in the $searchEngine->namespaces array.
-$query : Original query.
-&$parsed : Resultant query with the prefixes stripped.
-
 'SearchResultInitFromTitle': Set the revision used when displaying a page in
 search results.
 $title : Current Title object being displayed in search results.
diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index 3a3baef..f83fae1 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -318,7 +318,6 @@
 
                $parsed = $query;
                if ( strpos( $query, ':' ) === false ) { // nothing to do
-                       wfRunHooks( 'SearchEngineReplacePrefixesComplete', 
array( $this, $query, &$parsed ) );
                        return $parsed;
                }
 
@@ -337,8 +336,6 @@
                if ( trim( $parsed ) == '' ) {
                        $parsed = $query; // prefix was the whole query
                }
-
-               wfRunHooks( 'SearchEngineReplacePrefixesComplete', array( 
$this, $query, &$parsed ) );
 
                return $parsed;
        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I853a01afc8e922f22e949321a2f2343d264632a6
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