Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F5911
ApiQuerySiteinfo.php.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 10:44 PM
2014-11-21 22:44:10 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
ApiQuerySiteinfo.php.patch
View Options
Index: ApiQuerySiteinfo.php
===================================================================
--- ApiQuerySiteinfo.php (revision 53800)
+++ ApiQuerySiteinfo.php (working copy)
@@ -71,6 +71,9 @@
case 'statistics':
$fit = $this->appendStatistics( $p );
break;
+ case 'configsettings':
+ $fit = $this->appendConfigSettings( $p );
+ break;
case 'usergroups':
$fit = $this->appendUserGroups( $p, $params['numberingroup'] );
break;
@@ -316,6 +319,17 @@
return $this->getResult()->addValue( 'query', $property, $data );
}
+ protected function appendConfigSettings( $property ) {
+ global $wgRateLimits, $wgRCMaxAge, $wgRightsIcon, $wgVersion;
+ $data = array();
+ $data['wgRateLimits'] = $wgRateLimits;
+ $data['wgRCMaxAge'] = $wgRCMaxAge;
+ $data['wgRightsIcon'] = $wgRightsIcon;
+ $data['wgVersion'] = $wgVersion;
+ return $this->getResult()->addValue( 'query', $property, $data );
+ }
+
+
protected function appendUserGroups( $property, $numberInGroup ) {
global $wgGroupPermissions;
$data = array();
@@ -423,6 +437,7 @@
'interwikimap',
'dbrepllag',
'statistics',
+ 'configsettings',
'usergroups',
'extensions',
'fileextensions',
@@ -451,6 +466,7 @@
' specialpagealiases - List of special page aliases',
' magicwords - List of magic words and their aliases',
' statistics - Returns site statistics',
+ ' configsettings - Returns configuration settings relevant to the API',
' interwikimap - Returns interwiki map (optionally filtered)',
' dbrepllag - Returns database server with the highest replication lag',
' usergroups - Returns user groups and the associated permissions',
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5459
Default Alt Text
ApiQuerySiteinfo.php.patch (1 KB)
Attached To
Mode
T21937: Configuration settings not available via the API
Attached
Detach File
Event Timeline
Log In to Comment