Merge "(bug 41716) Add variant config to siprop=general"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 25 Feb 2013 18:22:13 +0000 (18:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 25 Feb 2013 18:22:13 +0000 (18:22 +0000)
includes/api/ApiQuerySiteinfo.php

index 624711a..19382f8 100644 (file)
@@ -114,7 +114,9 @@ class ApiQuerySiteinfo extends ApiQueryBase {
        }
 
        protected function appendGeneralInfo( $property ) {
-               global $wgContLang;
+               global $wgContLang,
+                       $wgDisableLangConversion,
+                       $wgDisableTitleConversion;
 
                $data = array();
                $mainPage = Title::newMainPage();
@@ -127,6 +129,14 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                $data['dbtype'] = $GLOBALS['wgDBtype'];
                $data['dbversion'] = $this->getDB()->getServerVersion();
 
+               if ( !$wgDisableLangConversion ) {
+                       $data['langconversion'] = '';
+               }
+
+               if ( !$wgDisableTitleConversion ) {
+                       $data['titleconversion'] = '';
+               }
+
                $git = SpecialVersion::getGitHeadSha1( $GLOBALS['IP'] );
                if ( $git ) {
                        $data['git-hash'] = $git;