simplify sorting, fixes bug with mixed string and numeric values
This commit is contained in:
parent
8a21d03cba
commit
77f56fe462
|
@ -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_merge ($input[$i][$j]['options'], $input[$i][$j]['options_selected'] );
|
||||||
$options = array_unique($options);
|
$options = array_unique($options);
|
||||||
if (!$input[$i][$j]['noSorting']) {
|
if (!$input[$i][$j]['noSorting']) {
|
||||||
if (get_preg($options[0], 'digit')) sort($options, SORT_NUMERIC);
|
sort($options);
|
||||||
else sort($options, SORT_STRING);
|
|
||||||
}
|
}
|
||||||
foreach ($options as $option) {
|
foreach ($options as $option) {
|
||||||
if ($option!='') {
|
if ($option!='') {
|
||||||
|
|
Loading…
Reference in New Issue