mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
only explode default value by comma, if we allow multiple values (otherwise defaults containing commas are never displayed, eg. addressbook link_title or fileas_type
This commit is contained in:
parent
3f137a1f64
commit
f767742f67
@ -536,7 +536,6 @@
|
||||
$extra = array('**NULL**' => lang('Users choice'));
|
||||
break;
|
||||
}
|
||||
#if ($extra) $values = $extra + $values;
|
||||
if (is_array($extra)) $values = $extra + (is_array($values)?$values:array($values));
|
||||
|
||||
$select = html::select($GLOBALS['type'].'['.$name.']',$default,$values,true);
|
||||
@ -558,8 +557,10 @@
|
||||
$values += $val;
|
||||
}
|
||||
}
|
||||
$default_value = $GLOBALS['egw']->preferences->default[$_appname][$name];
|
||||
if ($multiple) $default_value = explode(',',$default_value);
|
||||
$defs = array();
|
||||
foreach(explode(',',$GLOBALS['egw']->preferences->default[$_appname][$name]) as $def)
|
||||
foreach((array)$default_value as $def)
|
||||
{
|
||||
if ($values[$def]) $defs[] = $values[$def];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user