Merge "jquery.accessKeyLabel: make modifier info public"
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchangeslinked.php
index e947586..8db8f24 100644 (file)
@@ -55,7 +55,7 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
                        return false;
                }
                $outputPage = $this->getOutput();
-               $title = Title::newFromURL( $target );
+               $title = Title::newFromText( $target );
                if ( !$title || $title->isExternal() ) {
                        $outputPage->addHtml( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' )
                                        ->parse() . '</div>' );
@@ -273,7 +273,9 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
         * @return string[] Matching subpages
         */
        public function prefixSearchSubpages( $search, $limit, $offset ) {
-               if ( $search === '' ) {
+               $title = Title::newFromText( $search );
+               if ( !$title || !$title->canExist() ) {
+                       // No prefix suggestion in special and media namespace
                        return array();
                }
                // Autocomplete subpage the same as a normal search