Page MenuHomePhabricator

Configuration settings not available via the API
Closed, ResolvedPublic

Description

Author: brianna.laugher

Description:
There are a number of configuration settings that affect things in the API e.g. $wgRCMaxAge. These should be available via the API.

(I am volunteering to write a patch to add this, if I can get enough guidance about the right way to do it.)


Version: unspecified
Severity: enhancement

Details

Reference
bz19937

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:44 PM
bzimport set Reference to bz19937.

brianna.laugher wrote:

patch to add siprop=configsettings to meta=siteinfo

I only added 4 for now: $wgRateLimits, $wgRCMaxAge, $wgRightsIcon, $wgVersion. I am not sure which other ones are relevant and I wanted to avoid just adding virtually everything. Quite a few are also available indirectly through existing API modules.

Attached:

At first blush, the patch looks pretty good.

I wonder if it would be sensible to allow users to request specific configuration settings...

In future, we'll want to integrate this with some sort of on-wiki configuration system, like Configure.

(In reply to comment #2)

I wonder if it would be sensible to allow users to request specific
configuration settings...

Considered before and decided against (I think it was even committed and reverted).

(In reply to comment #1)

I only added 4 for now: $wgRateLimits, $wgRCMaxAge, $wgRightsIcon, $wgVersion.

I seem to recall Brion reverted a rev of mine exposing $wgRateLimits, I'll ask him about it. $wgVersion is already exposed by siprop=general .

As Chad has pointed out, this is an obvious duplicate of bug 17027, which Brion WONTFIXed. I apologize for not noticing/remembering earlier.

  • This bug has been marked as a duplicate of bug 17027 ***