canceled and a normal search will be performed. Returning true without setting
$url does a standard redirect to $title. Setting $url redirects to the
specified URL.
-$term - The string the user searched for
-$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
+$term: The string the user searched for
+$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.
&$user: User object
$ip: User's IP address
&$blocked: Whether the user is blocked, to be modified by the hook
+&$block: The Block object, to be modified by the hook
'UserIsEveryoneAllowed': Check if all users are allowed some user right; return
false if a UserGetRights hook might remove the named right.
if ( $out->isArticle() && MWNamespace::hasSubpages( $out->getTitle()->getNamespace() ) ) {
$ptext = $this->getTitle()->getPrefixedText();
- if ( preg_match( '/\//', $ptext ) ) {
+ if ( strpos( $ptext, '/' ) !== false ) {
$links = explode( '/', $ptext );
array_pop( $links );
$c = 0;