'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
}
# If there's an exact or very near match, jump right there.
$t = SearchEngine::getNearMatch( $term );
- wfRunHooks( 'SpecialSearchGo', array( &$t ) );
+
+ if ( !wfRunHooks( 'SpecialSearchGo', array( &$t, &$term ) ) ) {
+ # Hook requested termination
+ return;
+ }
+
if( !is_null( $t ) ) {
$wgOut->redirect( $t->getFullURL() );
return;