Apply hack from 1.16wmf4 in r71329 to trunk (follow-up to r71327). The version in...
authorAndrew Garrett <werdna@users.mediawiki.org>
Fri, 20 Aug 2010 06:19:37 +0000 (06:19 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Fri, 20 Aug 2010 06:19:37 +0000 (06:19 +0000)
languages/Language.php

index 3056143..949ff71 100644 (file)
@@ -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] );