summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-07-03 12:00:25 +0200
committerAleksander Machniak <alec@alec.pl>2013-07-03 12:00:25 +0200
commit42b9ce64151f86e4f77d4b01b3fa36461ae9abcc (patch)
tree2286aa9ccb40c7a7b253ec77027c0b21b52ca192 /program/lib/Roundcube
parent98884050cc7c2ba5f3e1fd82ac9a405c85413dc0 (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/lib/Roundcube')
-rw-r--r--program/lib/Roundcube/rcube_ldap.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php
index 522c81d8b..29da13c13 100644
--- a/program/lib/Roundcube/rcube_ldap.php
+++ b/program/lib/Roundcube/rcube_ldap.php
@@ -1191,8 +1191,7 @@ class rcube_ldap extends rcube_addressbook
// change the group membership of the contact
if ($this->groups) {
$group_ids = $this->get_record_groups($dn);
- foreach ($group_ids as $group_id => $group_prop)
- {
+ foreach (array_keys($group_ids) as $group_id) {
$this->remove_from_group($group_id, $dn);
$this->add_to_group($group_id, $newdn);
}
@@ -1257,7 +1256,7 @@ class rcube_ldap extends rcube_addressbook
if ($this->groups) {
$dn = self::dn_encode($dn);
$group_ids = $this->get_record_groups($dn);
- foreach ($group_ids as $group_id => $group_prop) {
+ foreach (array_keys($group_ids) as $group_id) {
$this->remove_from_group($group_id, $dn);
}
}
@@ -1879,8 +1878,9 @@ class rcube_ldap extends rcube_addressbook
$entry['dn'] = $ldap_data->get_dn();
$group_name = $entry[$name_attr][0];
$group_id = self::dn_encode($entry['dn']);
- $groups[$group_id] = array('ID' => $group_id, 'name' => $group_name, 'dn' => $entry['dn']);
+ $groups[$group_id] = $group_name;
}
+
return $groups;
}