From d0045bcd78de72be86fe637afec6d2c03dc4461d Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 26 Feb 2010 18:24:58 +0000 Subject: [PATCH] API: Don't unstub $wgContLang in ApiBase::getValidNamespaces() --- includes/api/ApiBase.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 39205bdce2..419d64cccd 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -521,10 +521,10 @@ abstract class ApiBase { static $mValidNamespaces = null; if ( is_null( $mValidNamespaces ) ) { - global $wgContLang; - $mValidNamespaces = array(); - foreach ( array_keys( $wgContLang->getNamespaces() ) as $ns ) { - if ( $ns >= 0 ) { + global $wgCanonicalNamespaceNames; + $mValidNamespaces = array( NS_MAIN ); // Doesn't appear in $wgCanonicalNamespaceNames for some reason + foreach ( array_keys( $wgCanonicalNamespaceNames ) as $ns ) { + if ( $ns > 0 ) { $mValidNamespaces[] = $ns; } } -- 2.20.1