Skip to content

Commit

Permalink
Merge branch 'w06_MDL-26256_20_collator' of git://github.com/skodak/m…
Browse files Browse the repository at this point in the history
…oodle
  • Loading branch information
stronk7 committed Feb 7, 2011
2 parents 476b123 + 0b661c7 commit e32d5f9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/textlib.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,11 @@ function strtotitle($text) {
*/
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);
}
}

0 comments on commit e32d5f9

Please sign in to comment.