From: Bartosz DziewoƄski Date: Fri, 28 Jul 2017 17:13:54 +0000 (+0200) Subject: updateCredits: Fix collation name X-Git-Tag: 1.31.0-rc.0~2551^2 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=25d8d26071278e3e5fdc30cb44dff705690884ae;p=lhc%2Fweb%2Fwiklou.git updateCredits: Fix collation name 'uca-default-u-kn' is a valid name for MediaWiki's category collation functionality ($wgCategoryCollation / Collation class), not for PHP's collation functionality (Collator class). 'uca-default-u-kn' for Collation maps to 'root-u-kn' for Collator (see Collation::factory()), and the '-u-kn' suffix is later stripped to enable numeric collation (see IcuCollation::_construct()). This doesn't seem to result in any changes in the output. Change-Id: I8cc7d283aee5408f8b7bed365661ff286236a694 --- diff --git a/maintenance/updateCredits.php b/maintenance/updateCredits.php index 287a40c558..b7e8c1ccd3 100644 --- a/maintenance/updateCredits.php +++ b/maintenance/updateCredits.php @@ -69,7 +69,8 @@ foreach ( $lines as $line ) { } $contributors = array_keys( $contributors ); -$collator = Collator::create( 'uca-default-u-kn' ); +$collator = Collator::create( 'root' ); +$collator->setAttribute( Collator::NUMERIC_COLLATION, Collator::ON ); $collator->sort( $contributors ); array_walk( $contributors, function ( &$v, $k ) { $v = "* {$v}";