From: Ian Marlier Date: Wed, 22 Nov 2017 17:02:26 +0000 (-0500) Subject: API:Siteinfo: Include wgCategoryCollation in Siteinfo response X-Git-Tag: 1.31.0-rc.0~1406 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=b9b1e863d9eddf15fd8c7f7b7f61ecb781bb6823 API:Siteinfo: Include wgCategoryCollation in Siteinfo response Include the value of $wgCategoryCollation in the siteinfo general array. This will allow AWB to get this information without needing to scrape the NOC InitialiseSettings.php.txt file. Bug: T179795 Change-Id: I76f85c71d2fe0d7a0482fb5eda0458708057e48d --- diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 6b896c95ad..2e9e69c9a5 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -283,6 +283,8 @@ class ApiQuerySiteinfo extends ApiQueryBase { $data['interwikimagic'] = (bool)$config->get( 'InterwikiMagic' ); $data['magiclinks'] = $config->get( 'EnableMagicLinks' ); + $data['categorycollation'] = $config->get( 'CategoryCollation' ); + Hooks::run( 'APIQuerySiteInfoGeneralInfo', [ $this, &$data ] ); return $this->getResult()->addValue( 'query', $property, $data );