Page MenuHomePhabricator

Expose $wgCategoryCollation in SiteInfo
Closed, ResolvedPublic

Description

I just noticed AWB has some horrible scraping code which involves loading InitialiseSettings.php.txt from NOC

Would be easier if we just exposed it in the siteinfo.

URL: https://www.mediawiki.org/wiki/API:Siteinfo


Example need: https://sourceforge.net/p/autowikibrowser/code/12171/tree/AWB/WikiFunctions/SiteInfo.cs#l251

Event Timeline

Anomie subscribed.

It should be easy enough for someone to add to ApiQuerySiteinfo::appendGeneralInfo() following the example of the other stuff there.

Krinkle triaged this task as Medium priority.Nov 18 2017, 2:11 AM

Change 392866 had a related patch set uploaded (by Imarlier; owner: Imarlier):
[mediawiki/core@master] Include the wgConf->settings array in the output of the general siteinfo query: https://phabricator.wikimedia.org/T179795

https://gerrit.wikimedia.org/r/392866

Since I clearly didn't quite get the point of the request initially, seems like I could use a bit more info.

AWB is currently scraping the txt page from NOC in order to build up a local cache of the CategoryCollation setting for all WMF wikis. Is the desired outcome providing a way to continue to maintain the existing code as is (that is, including the full list of all possible settings for wgCategoryCollation in response to an API query)? Or simply including the current value of wgCategoryCollation for the current wiki (with appropriate changes to AWB to follow)?

I was initially assuming the former, but it sounds like the latter is actually the desired behavior.

Change 392866 had a related patch set uploaded (by Imarlier; owner: Imarlier):
[mediawiki/core@master] API:Siteinfo: Include wgCategoryCollation in Siteinfo response

https://gerrit.wikimedia.org/r/392866

Change 392866 merged by jenkins-bot:
[mediawiki/core@master] API:Siteinfo: Include wgCategoryCollation in Siteinfo response

https://gerrit.wikimedia.org/r/392866