From bd0d6c182ebca250e76d166eb5f7c56ca76ba747 Mon Sep 17 00:00:00 2001 From: Mark Holmquist Date: Wed, 20 Feb 2013 11:15:35 -0800 Subject: [PATCH] (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 --- includes/api/ApiQuerySiteinfo.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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; -- 2.20.1