From 0b8c5ca6b99a521ffb80c5ac026f1f36afb7cf19 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 2 Oct 2009 09:44:34 +0000 Subject: [PATCH] * (bug 20885) Search box no longer suggests unavailable special pages --- RELEASE-NOTES | 1 + includes/PrefixSearch.php | 3 +++ 2 files changed, 4 insertions(+) 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; } -- 2.20.1