HTMLForm: Use <button> and allow differing label and value
[lhc/web/wiklou.git] / includes / specials / SpecialAllPages.php
index c255fcd..9e75522 100644 (file)
@@ -365,7 +365,9 @@ class SpecialAllPages extends IncludableSpecialPage {
         * @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