mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:18:57 +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
b2c44b9b5c
commit
f8ef7d5fe7
@ -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