From: Chad Horohoe Date: Wed, 16 Apr 2014 19:32:54 +0000 (-0700) Subject: Remove 2 unused Special:Search hooks X-Git-Tag: 1.31.0-rc.0~16162^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=f234aa61f58c637fc2b0a522017f6c9a7ef74225;p=lhc%2Fweb%2Fwiklou.git Remove 2 unused Special:Search hooks 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 --- diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 50d7392f39..500d19f832 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -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 == diff --git a/docs/hooks.txt b/docs/hooks.txt index 302494f497..de4bc3b1e6 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index ec8d754e26..949b86337f 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -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( "

{$prevnext}

\n" ); } - wfRunHooks( 'SpecialSearchResultsAppend', array( $this, $out, $term ) ); } /**