$title: The title the 'go' feature has decided to forward the user to
&$url: Initially null, hook subscribers can set this to specify the final url to redirect to
-'SpecialSearchNogomatch': Called when user clicked the "Go" button but the
-target doesn't exist.
+'SpecialSearchNogomatch': Called when the 'Go' feature is triggered (generally
+from autocomplete search other than the main bar on Special:Search) and the
+target doesn't exist. Full text search results are generated after this hook is
+called.
&$title: title object generated from the text entered by the user
'SpecialSearchPowerBox': The equivalent of SpecialSearchProfileForm for
$out->redirect( $url );
return;
}
+ // No match. If it could plausibly be a title
+ // run the No go match hook.
+ $title = Title::newFromText( $term );
+ if ( !is_null( $title ) ) {
+ Hooks::run( 'SpecialSearchNogomatch', [ &$title ] );
+ }
}
$this->setupPage( $term );