From d67ab7f70ff420268de07b83f74bbf4e727e9fda Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Fri, 20 Aug 2010 06:19:37 +0000 Subject: [PATCH] Apply hack from 1.16wmf4 in r71329 to trunk (follow-up to r71327). The version in r71327 breaks special pages. --- languages/Language.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/languages/Language.php b/languages/Language.php index 30561437b4..949ff71e82 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -258,7 +258,9 @@ class Language { } # Sometimes a language will be localised but not actually exist on this wiki. - $validNamespaces = MWNamespace::getValidNamespaces(); + global $wgCanonicalNamespaceNames; + $validNamespaces = array_keys($wgCanonicalNamespaceNames); + $validNamespaces[] = NS_MAIN; foreach( $this->namespaceNames as $key => $text ) { if ( ! in_array( $key, $validNamespaces ) ) { unset( $this->namespaceNames[$key] ); -- 2.20.1