From da0070e9d10e6ffe9facdb8f7ab037104dbf3fb9 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 20 Jun 2014 15:18:42 -0700 Subject: [PATCH] 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 --- RELEASE-NOTES-1.24 | 1 + docs/hooks.txt | 6 ------ includes/search/SearchEngine.php | 3 --- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 4f0ae21d18..88bc2af4ea 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -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 diff --git a/docs/hooks.txt b/docs/hooks.txt index 80ac174fb5..f5f81155b9 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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. diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index 3a3baef18c..f83fae1f62 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -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; } -- 2.20.1