API:Siteinfo: Include wgCategoryCollation in Siteinfo response
authorIan Marlier <imarlier@wikimedia.org>
Wed, 22 Nov 2017 17:02:26 +0000 (12:02 -0500)
committerReedy <reedy@wikimedia.org>
Mon, 27 Nov 2017 01:24:49 +0000 (01:24 +0000)
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

includes/api/ApiQuerySiteinfo.php

index 6b896c9..2e9e69c 100644 (file)
@@ -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 );