From 8a9f0e54f5ba0d7061c970228c5eec4004980896 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sun, 12 Dec 2010 18:57:10 +0000 Subject: [PATCH] Followup r65114 (per CR cabal), remove SpecialSearchGomatch, replace with SpecialSearchGo in SearchEngine::getNearMatch --- docs/hooks.txt | 3 +-- includes/search/SearchEngine.php | 2 ++ includes/specials/SpecialSearch.php | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.20.1