From: tjhunt Date: Mon, 7 Jan 2008 16:46:35 +0000 (+0000) Subject: Use the locale to sort the list of activites everywhere. This matches a change a... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=dba21d4a197c5d5cd3314a2511cce4a292e8d7ce;p=moodle.git Use the locale to sort the list of activites everywhere. This matches a change a made in one place before christmas. If you don't do this, the PHP sorts by ASCII order, so mixed case names, or special characters, get sorted wrongly. Merged from MOODLE_19_STABLE. --- diff --git a/admin/modules.php b/admin/modules.php index c550dfd33e..3b948a4768 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -182,7 +182,7 @@ } $modulebyname[$strmodulename] = $module; } - ksort($modulebyname); + ksort($modulebyname, SORT_LOCALE_STRING); /// Print the table of all modules // construct the flexible table ready to display diff --git a/course/lib.php b/course/lib.php index 250fb31577..b269d912b5 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1259,7 +1259,7 @@ function get_all_mods($courseid, &$mods, &$modnames, &$modnamesplural, &$modname } } if ($modnamesused) { - asort($modnamesused); + asort($modnamesused, SORT_LOCALE_STRING); } } } diff --git a/help.php b/help.php index 506090d4c5..330c0c050f 100644 --- a/help.php +++ b/help.php @@ -149,7 +149,7 @@ function include_help_for_each_module($file, $langs, $helpdir) { $strmodulename = get_string('modulename', $mod->name); $modulebyname[$strmodulename] = $mod; } - ksort($modulebyname); + ksort($modulebyname, SORT_LOCALE_STRING); foreach ($modulebyname as $mod) { foreach ($langs as $lang) {