From f62b4784a0f20764d211d687fa78992987429e67 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 21 Mar 2012 09:24:04 +0000 Subject: [PATCH] * API: fix account-selection-method "selectbox" containing selected account double (eg. in Admin >> Manage groups) --- phpgwapi/inc/class.uiaccountsel.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.uiaccountsel.inc.php b/phpgwapi/inc/class.uiaccountsel.inc.php index cc1c53dda0..ec3a26bf8e 100644 --- a/phpgwapi/inc/class.uiaccountsel.inc.php +++ b/phpgwapi/inc/class.uiaccountsel.inc.php @@ -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; }