mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
Fix defaults showing "Array" instead of array values
This commit is contained in:
parent
fe5650e144
commit
127663af77
@ -372,14 +372,18 @@ class preferences_settings
|
||||
$GLOBALS['egw']->preferences->group[$appname][$setting['name']] :
|
||||
$GLOBALS['egw']->preferences->default[$appname][$setting['name']];
|
||||
|
||||
if (isset($setting['values']) && (string)$setting['values'][$default] !== '')
|
||||
if (isset($setting['values']) && !is_array($setting['values'][$default]) && (string)$setting['values'][$default] !== '')
|
||||
{
|
||||
$default = $setting['values'][$default];
|
||||
}
|
||||
elseif (strpos($default, ',') !== false)
|
||||
{
|
||||
$default = explode(',',$default);
|
||||
}
|
||||
if(is_array($default))
|
||||
{
|
||||
$values = array();
|
||||
foreach(explode(',', $default) as $value)
|
||||
foreach($default as $value)
|
||||
{
|
||||
if (isset($setting['values'][$value])) $values[] = $setting['values'][$value];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user