Remove 2 unused Special:Search hooks
authorChad Horohoe <chadh@wikimedia.org>
Wed, 16 Apr 2014 19:32:54 +0000 (12:32 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Fri, 18 Apr 2014 15:23:38 +0000 (08:23 -0700)
Nothing is listed on mw.org as using these and nothing in Git uses
them either. Less hooks is a good thing, we've still got 11 here :(

Change-Id: I2dd1dbb269820b192f8d9e9a496a161f4ef851bf

RELEASE-NOTES-1.24
docs/hooks.txt
includes/specials/SpecialSearch.php

index 50d7392..500d19f 100644 (file)
@@ -30,6 +30,8 @@ changes to languages because of Bugzilla reports.
 === Other changes in 1.24 ===
 * The deprecated jquery.delayedBind ResourceLoader module was removed.
 * The deprecated function mw.util.toggleToc was removed.
+* The Special:Search hooks SpecialSearchGo and SpecialSearchResultsAppend
+  were removed as they were unused.
 
 == Compatibility ==
 
index 302494f..de4bc3b 100644 (file)
@@ -2429,10 +2429,6 @@ go to the existing page.
 $t: title object searched for
 &$params: an array of the default message name and page title (as parameter)
 
-'SpecialSearchGo': Called when user clicked the "Go".
-&$title: title object generated from the text entered by the user
-&$term: the search term entered by the user
-
 'SpecialSearchNogomatch': Called when user clicked the "Go" button but the
 target doesn't exist.
 &$title: title object generated from the text entered by the user
@@ -2466,14 +2462,6 @@ $specialSearch: SpecialSearch object ($this)
 $output: $wgOut
 $term: Search term specified by the user
 
-'SpecialSearchResultsAppend': Called after all search results HTML has
-been output.  Note that in some cases, this hook will not be called (no
-results, too many results, SpecialSearchResultsPrepend returned false,
-etc).
-$specialSearch: SpecialSearch object ($this)
-$output: $wgOut
-$term: Search term specified by the user
-
 'SpecialSearchResults': Called before search result display when there are
 matches.
 $term: string of search term
index ec8d754..949b863 100644 (file)
@@ -177,11 +177,6 @@ class SpecialSearch extends SpecialPage {
                # If there's an exact or very near match, jump right there.
                $title = SearchEngine::getNearMatch( $term );
 
-               if ( !wfRunHooks( 'SpecialSearchGo', array( &$title, &$term ) ) ) {
-                       # Hook requested termination
-                       return;
-               }
-
                if ( !is_null( $title ) ) {
                        $this->getOutput()->redirect( $title->getFullURL() );
 
@@ -421,7 +416,6 @@ class SpecialSearch extends SpecialPage {
                if ( $num || $this->offset ) {
                        $out->addHTML( "<p class='mw-search-pager-bottom'>{$prevnext}</p>\n" );
                }
-               wfRunHooks( 'SpecialSearchResultsAppend', array( $this, $out, $term ) );
        }
 
        /**