jquery.tablesorter: Disable a flaky isoDate test case
[lhc/web/wiklou.git] / includes / specials / SpecialSearch.php
index b7356e7..139e4f7 100644 (file)
@@ -146,6 +146,12 @@ class SpecialSearch extends SpecialPage {
                                $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 );
@@ -253,7 +259,7 @@ class SpecialSearch extends SpecialPage {
                        return null;
                }
 
-               return $url === null ? $title->getFullURL() : $url;
+               return $url === null ? $title->getFullUrlForRedirect() : $url;
        }
 
        /**