From: Roan Kattouw Date: Fri, 28 Mar 2008 13:12:47 +0000 (+0000) Subject: API: Added fallback8bitEncoding to meta=siteinfo output X-Git-Tag: 1.31.0-rc.0~48754 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;ds=sidebyside;h=8dd17b2b5ce4b2bbb6aef3f8be0035a582e86e0c;p=lhc%2Fweb%2Fwiklou.git API: Added fallback8bitEncoding to meta=siteinfo output --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2a191f4f96..51aa602f31 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -172,6 +172,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Replaced $wgAPIUCUserPrefixMinLength by the more generic $wgAPIMaxDBRows * (bug 11719) Remove trailing blanks in YAML output. * (bug 13541) Added siprop=specialpagealiases to meta=siteinfo +* Added fallback8bitEncoding field to meta=siteinfo&siprop=general output === Languages updated in 1.13 === diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index f8a401a144..d070411527 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -74,7 +74,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { } protected function appendGeneralInfo($property) { - global $wgSitename, $wgVersion, $wgCapitalLinks, $wgRightsCode, $wgRightsText, $wgLanguageCode, $IP, $wgEnableWriteAPI; + global $wgSitename, $wgVersion, $wgCapitalLinks, $wgRightsCode, $wgRightsText, $wgLanguageCode, $IP, $wgEnableWriteAPI, $wgLang; $data = array (); $mainPage = Title :: newFromText(wfMsgForContent('mainpage')); @@ -87,10 +87,12 @@ class ApiQuerySiteinfo extends ApiQueryBase { if ( $svn ) $data['rev'] = $svn; $data['case'] = $wgCapitalLinks ? 'first-letter' : 'case-sensitive'; // 'case-insensitive' option is reserved for future + if (isset($wgRightsCode)) $data['rightscode'] = $wgRightsCode; $data['rights'] = $wgRightsText; $data['lang'] = $wgLanguageCode; + $data['fallback8bitEncoding'] = $wgLang->fallback8bitEncoding(); if ( $wgEnableWriteAPI ) $data['writeapi'] = '';