dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "filebackend: reduce hashing I/O in SwiftFileBackend::doStoreInternal()"
[lhc/web/wiklou.git]
/
maintenance
/
updateCredits.php
diff --git
a/maintenance/updateCredits.php
b/maintenance/updateCredits.php
index
287a40c
..
25ce3ce
100644
(file)
--- a/
maintenance/updateCredits.php
+++ b/
maintenance/updateCredits.php
@@
-26,6
+26,12
@@
if ( PHP_SAPI != 'cli' ) {
die( "This script can only be run from the command line.\n" );
}
die( "This script can only be run from the command line.\n" );
}
+// class Collator is provided by the intl extension.
+// It is only suggested in composer.json, so remind here when not loaded.
+if ( !extension_loaded( 'intl' ) ) {
+ die( "This script needs the 'intl' extension to be loaded." );
+}
+
$CREDITS = 'CREDITS';
$START_CONTRIBUTORS = '<!-- BEGIN CONTRIBUTOR LIST -->';
$END_CONTRIBUTORS = '<!-- END CONTRIBUTOR LIST -->';
$CREDITS = 'CREDITS';
$START_CONTRIBUTORS = '<!-- BEGIN CONTRIBUTOR LIST -->';
$END_CONTRIBUTORS = '<!-- END CONTRIBUTOR LIST -->';
@@
-69,7
+75,8
@@
foreach ( $lines as $line ) {
}
$contributors = array_keys( $contributors );
}
$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}";
$collator->sort( $contributors );
array_walk( $contributors, function ( &$v, $k ) {
$v = "* {$v}";