From c6ee20840ae0a9307507d2708b93f5610e4bec5a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 21 Mar 2012 09:25:23 +0000 Subject: [PATCH] * API: fix account-selection-method "selectbox" containing selected account double (eg. in Admin >> Manage groups) --- phpgwapi/inc/class.uiaccountsel.inc.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/phpgwapi/inc/class.uiaccountsel.inc.php b/phpgwapi/inc/class.uiaccountsel.inc.php index 59e036334c..5bcc1697fd 100644 --- a/phpgwapi/inc/class.uiaccountsel.inc.php +++ b/phpgwapi/inc/class.uiaccountsel.inc.php @@ -178,6 +178,14 @@ class uiaccountsel 'app' => $app, )); } + // make sure everything in $selected is also in $select, as in the other account-selection methods + if ($selected && ($missing = array_diff_key($selected,$select))) + { + foreach($missing as $k => $v) // merge missing (cant use array_merge, because of nummeric keys!) + { + $select[$k] = $v; + } + } break; } $already_selected = $users = $groups = array();