From: Alexandre Emsenhuber Date: Fri, 2 Oct 2009 09:44:34 +0000 (+0000) Subject: * (bug 20885) Search box no longer suggests unavailable special pages X-Git-Tag: 1.31.0-rc.0~39415 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=0b8c5ca6b99a521ffb80c5ac026f1f36afb7cf19;p=lhc%2Fweb%2Fwiklou.git * (bug 20885) Search box no longer suggests unavailable special pages --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 992794d8a5..9811163fa8 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index 10c8593055..eb1a9cf605 100644 --- a/includes/PrefixSearch.php +++ b/includes/PrefixSearch.php @@ -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; }