diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a8386201fd..79e91eb289 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2012-07-26 Sergio Martin + + * include/functions_html.php: Change the sort function + of the html_print_select to use natural order (merging + lower and upper case chars) + 2012-07-26 Hirofumi Kosaka * godmode/agentes/module_manager_editor_common.php: diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 9e93e30b8e..f098fc84af 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -326,7 +326,8 @@ function html_print_select ($fields, $name, $selected = '', $script = '', if (is_array($fields) && !empty ($fields)) { if ($sort !== false) { - asort ($fields); + // Sorting the fields in natural way and case insensitive preserving keys + uasort($fields, "strnatcasecmp"); } $lastopttype = ''; foreach ($fields as $value => $label) {