Remove SearchEngineReplacePrefixesComplete hook
authorChad Horohoe <chadh@wikimedia.org>
Fri, 20 Jun 2014 22:18:42 +0000 (15:18 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Mon, 23 Jun 2014 15:48:45 +0000 (08:48 -0700)
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

RELEASE-NOTES-1.24
docs/hooks.txt
includes/search/SearchEngine.php

index 4f0ae21..88bc2af 100644 (file)
@@ -173,6 +173,7 @@ changes to languages because of Bugzilla reports.
 * Removed WebRequest::escapeAppendQuery(). (deprecated since 1.20)
 * Removed info(), purge(), revert() and rollback() from the Article class; they
   have since become subclasses of the Action class. (deprecated since 1.19)
+* SearchEngineReplacePrefixesComplete hook was removed.
 
 ==== Renamed classes ====
 * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
index 80ac174..f5f8115 100644 (file)
@@ -2182,12 +2182,6 @@ searches.
 $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.
index 3a3baef..f83fae1 100644 (file)
@@ -318,7 +318,6 @@ class SearchEngine {
 
                $parsed = $query;
                if ( strpos( $query, ':' ) === false ) { // nothing to do
-                       wfRunHooks( 'SearchEngineReplacePrefixesComplete', array( $this, $query, &$parsed ) );
                        return $parsed;
                }
 
@@ -338,8 +337,6 @@ class SearchEngine {
                        $parsed = $query; // prefix was the whole query
                }
 
-               wfRunHooks( 'SearchEngineReplacePrefixesComplete', array( $this, $query, &$parsed ) );
-
                return $parsed;
        }