mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +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)
|
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];
|
$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)
|
foreach($values as $value)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user