Skip to content
Browse files

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

…oodle
  • Loading branch information...
2 parents 476b123 + 0b661c7 commit e32d5f9b88374fa2622bdfcb29f8786136b6b34d @stronk7 stronk7 committed Feb 7, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/textlib.class.php
View
9 lib/textlib.class.php
@@ -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.
Something went wrong with that request. Please try again.