From: Mark Holmquist Date: Wed, 20 Feb 2013 19:15:35 +0000 (-0800) Subject: (bug 41716) Add variant config to siprop=general X-Git-Tag: 1.31.0-rc.0~20583^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=bd0d6c182ebca250e76d166eb5f7c56ca76ba747;p=lhc%2Fweb%2Fwiklou.git (bug 41716) Add variant config to siprop=general Parsoid again needs some extra information, this time so we can support language variant conversion on our side of things. Added to properties to the general siteinfo property. Change-Id: I1ec7da2ec5b08228e74fec4fb366dae26cab8936 --- diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 624711a61f..19382f8412 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -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;