* API: fix account-selection-method "selectbox" containing selected account double (eg. in Admin >> Manage groups)

This commit is contained in:
Ralf Becker 2012-03-21 09:24:30 +00:00
parent f5fdf4b1d3
commit 3141cf1c54

View File

@ -180,9 +180,12 @@ class uiaccountsel
));
}
// make sure everything in $selected is also in $select, as in the other account-selection methods
if ($selected && ($missing = array_diff($selected,$select)))
if ($selected && ($missing = array_diff_key($selected,$select)))
{
$select = array_merge($missing,$select);
foreach($missing as $k => $v) // merge missing (cant use array_merge, because of nummeric keys!)
{
$select[$k] = $v;
}
}
break;
}