Merge "Add some more detailed info about the xslt param of format=xml"
[lhc/web/wiklou.git] / includes / api / ApiQuerySiteinfo.php
index c83be79..e7102e0 100644 (file)
@@ -142,6 +142,15 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                $data['fallback'] = $fallbacks;
                $this->getResult()->setIndexedTagName( $data['fallback'], 'lang' );
 
+               if( $wgContLang->hasVariants() ) {
+                       $variants = array();
+                       foreach( $wgContLang->getVariants() as $code ) {
+                               $variants[] = array( 'code' => $code );
+                       }
+                       $data['variants'] = $variants;
+                       $this->getResult()->setIndexedTagName( $data['variants'], 'lang' );
+               }
+
                if ( $wgContLang->isRTL() ) {
                        $data['rtl'] = '';
                }
@@ -206,6 +215,10 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                        if ( MWNamespace::isContent( $ns ) ) {
                                $data[$ns]['content'] = '';
                        }
+
+                       if ( MWNamespace::isNonincludable( $ns ) ) {
+                               $data[$ns]['nonincludable'] = '';
+                       }
                }
 
                $this->getResult()->setIndexedTagName( $data, 'ns' );
@@ -474,7 +487,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
        public function appendLanguages( $property ) {
                $params = $this->extractRequestParams();
                $langCode = isset( $params['inlanguagecode'] ) ? $params['inlanguagecode'] : '';
-               $langNames = Language::getLanguageNames( $langCode );
+               $langNames = Language::fetchLanguageNames( $langCode );
 
                $data = array();