Skip to content

Commit

Permalink
Use the locale to sort the list of activites everywhere. This matches…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
tjhunt committed Jan 7, 2008
1 parent 1c8ec30 commit dba21d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion admin/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ function get_all_mods($courseid, &$mods, &$modnames, &$modnamesplural, &$modname
}
}
if ($modnamesused) {
asort($modnamesused);
asort($modnamesused, SORT_LOCALE_STRING);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion help.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dba21d4

Please sign in to comment.