* (bug 20885) Search box no longer suggests unavailable special pages
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 2 Oct 2009 09:44:34 +0000 (09:44 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 2 Oct 2009 09:44:34 +0000 (09:44 +0000)
RELEASE-NOTES
includes/PrefixSearch.php

index 992794d..9811163 100644 (file)
@@ -535,6 +535,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Password fields built with HTMLForm now still have the type="password" attribute
   if $wgHtml5=false.
 * (bug 20836) Preload now works for MediaWiki namespace
+* (bug 20885) Search box no longer suggests unavailable special pages
 
 == API changes in 1.16 ==
 
index 10c8593..eb1a9cf 100644 (file)
@@ -83,6 +83,9 @@ class PrefixSearch {
                        $keys[$wgContLang->caseFold( $page )] = $page;
                }
                foreach( $wgContLang->getSpecialPageAliases() as $page => $aliases ) {
+                       if( !array_key_exists( $page, SpecialPage::$mList ) ) # bug 20885
+                               continue;
+
                        foreach( $aliases as $alias ) {
                                $keys[$wgContLang->caseFold( $alias )] = $alias;
                        }