Index: branches/wmf-deployment/includes/api/ApiBase.php |
— | — | @@ -493,11 +493,10 @@ |
494 | 494 | public static function getValidNamespaces() { |
495 | 495 | static $mValidNamespaces = null; |
496 | 496 | if (is_null($mValidNamespaces)) { |
497 | | - |
498 | | - global $wgContLang; |
499 | | - $mValidNamespaces = array (); |
500 | | - foreach (array_keys($wgContLang->getNamespaces()) as $ns) { |
501 | | - if ($ns >= 0) |
| 497 | + global $wgCanonicalNamespaceNames; |
| 498 | + $mValidNamespaces = array( NS_MAIN ); // Doesn't appear in $wgCanonicalNamespaceNames for some reason |
| 499 | + foreach ( array_keys( $wgCanonicalNamespaceNames ) as $ns ) { |
| 500 | + if ( $ns > 0 ) { |
502 | 501 | $mValidNamespaces[] = $ns; |
503 | 502 | } |
504 | 503 | } |
Property changes on: branches/wmf-deployment/includes/api/ApiBase.php |
___________________________________________________________________ |
Name: svn:mergeinfo |
505 | 504 | + /branches/REL1_15/phase3/includes/api/ApiBase.php:51646 |
/branches/wmf-deployment/includes/api/ApiBase.php:53381 |
/trunk/phase3/includes/api/ApiBase.php:56213,56215-56216,56218,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57530,57541,57602,57916,58151,58219,58633,58816,60465,60587,60589,60704,61557,62540,62549,63011 |