From 77f56fe46282cdf9d3986b4cfc5325faf5100f06 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 25 Oct 2005 18:17:01 +0000 Subject: [PATCH] simplify sorting, fixes bug with mixed string and numeric values --- lam/lib/modules.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 284fde80..b343f562 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -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!='') {