diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-07-03 12:00:25 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-07-03 12:00:25 +0200 |
commit | 42b9ce64151f86e4f77d4b01b3fa36461ae9abcc (patch) | |
tree | 2286aa9ccb40c7a7b253ec77027c0b21b52ca192 /program/steps/addressbook/show.inc | |
parent | 98884050cc7c2ba5f3e1fd82ac9a405c85413dc0 (diff) |
Fix groups list in contact info page - get_record_groups() result
is a ID=>Name hash and cannot be merged with list_groups() result
Diffstat (limited to 'program/steps/addressbook/show.inc')
-rw-r--r-- | program/steps/addressbook/show.inc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/program/steps/addressbook/show.inc b/program/steps/addressbook/show.inc index 63abc8c4b..950764bb1 100644 --- a/program/steps/addressbook/show.inc +++ b/program/steps/addressbook/show.inc @@ -207,17 +207,13 @@ function rcmail_contact_record_groups($contact_id) return ''; } - $table = new html_table(array('cols' => 2, 'cellspacing' => 0, 'border' => 0)); - - $members = $CONTACTS->get_record_groups($contact_id); + $members = $CONTACTS->get_record_groups($contact_id); + $table = new html_table(array('cols' => 2, 'cellspacing' => 0, 'border' => 0)); $checkbox = new html_checkbox(array('name' => '_gid[]', 'class' => 'groupmember', 'disabled' => $CONTACTS->readonly)); - foreach (array_merge($GROUPS, $members) as $group) { + foreach ($GROUPS as $group) { $gid = $group['ID']; - if ($seen[$gid]++) - continue; - $table->add(null, $checkbox->show($members[$gid] ? $gid : null, array('value' => $gid, 'id' => 'ff_gid' . $gid))); $table->add(null, html::label('ff_gid' . $gid, Q($group['name']))); |