mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Preferences: Fix some default values were not shown correctly
Preferences that had options with label & value keys were done by index instead of value
This commit is contained in:
parent
b83887d44a
commit
9b6a14f2d8
@ -685,11 +685,11 @@ class preferences_settings
|
||||
}
|
||||
foreach($labels as &$def)
|
||||
{
|
||||
if (isset($values[$def]))
|
||||
if(isset($values[$def]) && (!is_array($values[$def]) || $values[$def]['value'] == $def))
|
||||
{
|
||||
$def = is_array($values[$def]) ? $values[$def]['label'] : $values[$def];
|
||||
}
|
||||
else // value could be in an optgroup
|
||||
else // value could be in an optgroup or array with label & value keys
|
||||
{
|
||||
foreach($values as $value)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user