Merge "Add a SpecialSearchResultsAppend hook"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 15 Jun 2015 20:09:24 +0000 (20:09 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 15 Jun 2015 20:09:24 +0000 (20:09 +0000)
RELEASE-NOTES-1.26
docs/hooks.txt
includes/specials/SpecialSearch.php

index 3693898..3cc1d26 100644 (file)
@@ -18,6 +18,10 @@ production.
 * ':' (colon) is now invalid in usernames for new accounts. Existing accounts
   are not affected.
 * Added a new hook, 'LogException', to log exceptions in nonstandard ways.
+* Revive the 'SpecialSearchResultsAppend' hook which occurs after the list of
+  search results are rendered. The initial use case is to append a "give us
+  feedback" link beneath the search results.
+
 
 ==== External libraries ====
 * Update es5-shim from v4.0.0 to v4.1.5.
@@ -150,3 +154,4 @@ going to run a public MediaWiki, so you can be notified of security fixes.
 == IRC help ==
 
 There's usually someone online in #mediawiki on irc.freenode.net.
+
index fda00f9..4546f9e 100644 (file)
@@ -2852,6 +2852,11 @@ $specialSearch: SpecialSearch object ($this)
 $output: $wgOut
 $term: Search term specified by the user
 
+'SpecialSearchResultsAppend': Called immediately before returning HTML
+on the search results page.  Useful for including a feedback link.
+$specialSearch: SpecialSearch object ($this)
+$output: $wgOut
+
 'SpecialSearchSetupEngine': Allows passing custom data to search engine.
 $search: SpecialSearch special page object
 $profile: String: current search profile
index ef50fed..bc1bb3d 100644 (file)
@@ -410,6 +410,9 @@ class SpecialSearch extends SpecialPage {
                if ( $prevnext ) {
                        $out->addHTML( "<p class='mw-search-pager-bottom'>{$prevnext}</p>\n" );
                }
+
+               Hooks::run( 'SpecialSearchResultsAppend', array( $this, $out ) );
+
        }
 
        /**