Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -521,10 +521,10 @@ |
522 | 522 | static $mValidNamespaces = null; |
523 | 523 | |
524 | 524 | if ( is_null( $mValidNamespaces ) ) { |
525 | | - global $wgContLang; |
526 | | - $mValidNamespaces = array(); |
527 | | - foreach ( array_keys( $wgContLang->getNamespaces() ) as $ns ) { |
528 | | - if ( $ns >= 0 ) { |
| 525 | + global $wgCanonicalNamespaceNames; |
| 526 | + $mValidNamespaces = array( NS_MAIN ); // Doesn't appear in $wgCanonicalNamespaceNames for some reason |
| 527 | + foreach ( array_keys( $wgCanonicalNamespaceNames ) as $ns ) { |
| 528 | + if ( $ns > 0 ) { |
529 | 529 | $mValidNamespaces[] = $ns; |
530 | 530 | } |
531 | 531 | } |