simplify sorting, fixes bug with mixed string and numeric values

This commit is contained in:
Roland Gruber 2005-10-25 18:17:01 +00:00
parent 8a21d03cba
commit 77f56fe462
1 changed files with 1 additions and 2 deletions

View File

@ -636,8 +636,7 @@ function parseHtml($module, $input, $values, $restricted, &$tabindex, &$tabindex
$options = array_merge ($input[$i][$j]['options'], $input[$i][$j]['options_selected'] );
$options = array_unique($options);
if (!$input[$i][$j]['noSorting']) {
if (get_preg($options[0], 'digit')) sort($options, SORT_NUMERIC);
else sort($options, SORT_STRING);
sort($options);
}
foreach ($options as $option) {
if ($option!='') {