From: Sam Reed Date: Sun, 12 Dec 2010 18:57:10 +0000 (+0000) Subject: Followup r65114 (per CR cabal), remove SpecialSearchGomatch, replace with SpecialSear... X-Git-Tag: 1.31.0-rc.0~33351 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=8a9f0e54f5ba0d7061c970228c5eec4004980896;p=lhc%2Fweb%2Fwiklou.git Followup r65114 (per CR cabal), remove SpecialSearchGomatch, replace with SpecialSearchGo in SearchEngine::getNearMatch --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 04174529da..e528d7a3cf 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1607,8 +1607,7 @@ $opts: FormOptions for this request &$query_options: array of options for the database request &$select: String '*' or array of columns to select -'SpecialSearchGomatch': called when user clicked the "Go" button and the target -exists +'SpecialSearchGo': called when user clicked the "Go" &$title: title object generated from the text entered by the user 'SpecialSearchNogomatch': called when user clicked the "Go" button but the diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index 984322d812..0a4b7c56d1 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -92,6 +92,8 @@ class SearchEngine { public static function getNearMatch( $searchterm ) { $title = self::getNearMatchInternal( $searchterm ); + wfRunHooks( 'SpecialSearchGomatch', array( &$title ) ); + wfRunHooks( 'SearchGetNearMatchComplete', array( $searchterm, &$title ) ); return $title; } diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 506955229f..c467102982 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -103,7 +103,6 @@ class SpecialSearch extends SpecialPage { # If there's an exact or very near match, jump right there. $t = SearchEngine::getNearMatch( $term ); if( !is_null( $t ) ) { - wfRunHooks( 'SpecialSearchGomatch', array( &$t ) ); $wgOut->redirect( $t->getFullURL() ); return; }