Fix bug introduced in untested r71576. getNamespaces() did not use getCanonicalNamesp...
authorAndrew Garrett <werdna@users.mediawiki.org>
Sun, 29 Aug 2010 03:03:28 +0000 (03:03 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Sun, 29 Aug 2010 03:03:28 +0000 (03:03 +0000)
languages/Language.php

index 71793e2..a5b6628 100644 (file)
@@ -262,6 +262,8 @@ class Language {
                        }
                        
                        # Sometimes a language will be localised but not actually exist on this wiki.
+                       global $wgCanonicalNamespaceNames;
+                       $validNamespaces = array_keys(MWNamespace::getCanonicalNamespaces());
                        foreach( $this->namespaceNames as $key => $text ) {
                                if ( !isset( $validNamespaces[$key] ) ) {
                                        unset( $this->namespaceNames[$key] );