Followup r65114 (per CR cabal), remove SpecialSearchGomatch, replace with SpecialSear...
authorSam Reed <reedy@users.mediawiki.org>
Sun, 12 Dec 2010 18:57:10 +0000 (18:57 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 12 Dec 2010 18:57:10 +0000 (18:57 +0000)
docs/hooks.txt
includes/search/SearchEngine.php
includes/specials/SpecialSearch.php

index 0417452..e528d7a 100644 (file)
@@ -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
index 984322d..0a4b7c5 100644 (file)
@@ -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;
        }
index 5069552..c467102 100644 (file)
@@ -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;
                }