From: Roan Kattouw Date: Sat, 2 May 2009 14:24:11 +0000 (+0000) Subject: API: (bug 18533) Add readonly message to meta=siteinfo output X-Git-Tag: 1.31.0-rc.0~41906 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=2e20458e1cbacbd73c313b1d570e20d58e5aa073;p=lhc%2Fweb%2Fwiklou.git API: (bug 18533) Add readonly message to meta=siteinfo output --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a0a7e68f92..3ef0ec5aea 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -127,6 +127,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 16422) Don't display help for format=jsonfm unless specifically requested * (bug 18617) Add xml:space="preserve" attribute to relevant tags in XML output * Added PHP and database version to meta=siteinfo output +* (bug 18533) Add readonly message to meta=siteinfo output === Languages updated in 1.16 === diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 3fe97121db..9d16fa8f3f 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -128,8 +128,10 @@ class ApiQuerySiteinfo extends ApiQueryBase { $data['rtl'] = ''; $data['fallback8bitEncoding'] = $wgLang->fallback8bitEncoding(); - if( wfReadOnly() ) + if( wfReadOnly() ) { $data['readonly'] = ''; + $data['readonlyreason'] = wfReadOnlyReason(); + } if( $GLOBALS['wgEnableWriteAPI'] ) $data['writeapi'] = '';