Followup r78268, do it as Bryan suggested, not as how I'd interpretted it for some...
authorSam Reed <reedy@users.mediawiki.org>
Mon, 13 Dec 2010 11:06:57 +0000 (11:06 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 13 Dec 2010 11:06:57 +0000 (11:06 +0000)
includes/search/SearchEngine.php
includes/specials/SpecialSearch.php

index 0a4b7c5..984322d 100644 (file)
@@ -92,8 +92,6 @@ class SearchEngine {
        public static function getNearMatch( $searchterm ) {
                $title = self::getNearMatchInternal( $searchterm );
 
-               wfRunHooks( 'SpecialSearchGomatch', array( &$title ) );
-
                wfRunHooks( 'SearchGetNearMatchComplete', array( $searchterm, &$title ) );
                return $title;
        }
index c467102..99cc0bf 100644 (file)
@@ -102,6 +102,7 @@ class SpecialSearch extends SpecialPage {
                }
                # If there's an exact or very near match, jump right there.
                $t = SearchEngine::getNearMatch( $term );
+               wfRunHooks( 'SpecialSearchGomatch', array( &$t ) );
                if( !is_null( $t ) ) {
                        $wgOut->redirect( $t->getFullURL() );
                        return;