summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-12-04 17:05:42 +0000
committerthomascube <thomas@roundcube.net>2011-12-04 17:05:42 +0000
commitf47d5e20891305d4c40f4f500318cfcbea4d2135 (patch)
treea44393ecffa0d4200f382156e4592c9f5d248b70 /program/include
parente237eec8468e99b65a9160a0a3f07529b92725e3 (diff)
Apply fixes r5539 and r5540 to release branch
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_ldap.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index 3ec0e5f3b..7699c4494 100644
--- a/program/include/rcube_ldap.php
+++ b/program/include/rcube_ldap.php
@@ -1019,7 +1019,7 @@ class rcube_ldap extends rcube_addressbook
$dn = self::dn_encode($dn);
// add new contact to the selected group
- if ($this->groups)
+ if ($this->group_id)
$this->add_to_group($this->group_id, $dn);
return $dn;
@@ -1700,13 +1700,16 @@ class rcube_ldap extends rcube_addressbook
if (($group_cache = $this->cache->get('groups')) === null)
$group_cache = $this->_fetch_groups();
+ if (!is_array($contact_ids))
+ $contact_ids = explode(',', $contact_ids);
+
$base_dn = $this->groups_base_dn;
$group_name = $group_cache[$group_id]['name'];
$member_attr = $group_cache[$group_id]['member_attr'];
$group_dn = "cn=$group_name,$base_dn";
$new_attrs = array();
- foreach (explode(",", $contact_ids) as $id)
+ foreach ($contact_ids as $id)
$new_attrs[$member_attr][] = self::dn_decode($id);
$this->_debug("C: Add [dn: $group_dn]: ".print_r($new_attrs, true));