Merge branch 'w06_MDL-26256_20_collator' of git://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2011-02-07 21:41:04 +01:00
commit e32d5f9b88

View File

@ -474,10 +474,11 @@ class textlib {
*/
function asort(array &$arr) {
if (function_exists('collator_asort')) {
$coll = collator_create(get_string('locale', 'langconfig'));
collator_asort($coll, $arr);
} else {
asort($arr, SORT_LOCALE_STRING);
if ($coll = collator_create(get_string('locale', 'langconfig'))) {
collator_asort($coll, $arr);
return;
}
}
asort($arr, SORT_LOCALE_STRING);
}
}