From 1828683be20ab7ec9ae0cb86c64b1116dd361553 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 3 Jun 2007 11:07:50 +0000 Subject: [PATCH] "fixed not working modification of contact with cn= dn" --- addressbook/inc/class.so_ldap.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.so_ldap.inc.php b/addressbook/inc/class.so_ldap.inc.php index d851d3afd4..1647df01c7 100644 --- a/addressbook/inc/class.so_ldap.inc.php +++ b/addressbook/inc/class.so_ldap.inc.php @@ -358,6 +358,7 @@ class so_ldap '(|(entryUUID='.ldap::quote($contactUID).')(uid='.ldap::quote($contactUID).'))', $attributes)) && ($oldContactInfo = ldap_get_entries($this->ds, $result)) && $oldContactInfo['count']) { + unset($oldContactInfo[0]['objectclass']['count']); foreach($oldContactInfo[0]['objectclass'] as $objectclass) { $oldObjectclasses[] = strtolower($objectclass); @@ -431,7 +432,7 @@ class so_ldap { if (!@ldap_mod_add($this->ds, $dn, array('objectClass' => $ldapContact['objectClass']))) { - if(ldap_errno($this->ds) == 69) + if(in_array(ldap_errno($this->ds),array(69,20))) { // need to modify structural objectclass $needRecreation = true;