Index: trunk/kernel/parser.php =================================================================== diff -u -N -r7867 -r8009 --- trunk/kernel/parser.php (.../parser.php) (revision 7867) +++ trunk/kernel/parser.php (.../parser.php) (revision 8009) @@ -618,29 +618,23 @@ // 2. replace any sqls found there $objConfigDummy = new clsConfigAdminItem(); - $values = $objConfigDummy->replace_sql($values); + $values = $objConfigDummy->GetValues($values); if(!$values) return ''; - if( GetVar($field) ) - { + if (GetVar($field)) { $value = GetVar($field); } - else - { + else { $value = $FormValues[$form][$field]; if( is_array($value) ) $value = $value['value']; } $ret = ''; - $values = explode(',', $values); $option_tpl = ''; - foreach($values as $mixed_value) - { - $mixed_value = explode('=', $mixed_value); - $label = substr($mixed_value[1],0,1) == '+' ? substr($mixed_value[1],1,strlen($mixed_value[1])) : language($mixed_value[1]); - $selected = $mixed_value[0] == $value ? ' selected' : ''; - $ret .= sprintf($option_tpl, $mixed_value[0], $selected, $label); + foreach ($values as $option_id => $option_title) { + $selected = $option_id == $value ? ' selected' : ''; + $ret .= sprintf($option_tpl, $option_id, $selected, $option_title); } return $ret;