From: blainett Date: Thu, 7 Jul 2005 08:18:20 +0000 (+0000) Subject: Bug: removing subtree before node X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=edf05cbd87ccdbc3db6e3be66bf93017cc503ead;p=gosa.git Bug: removing subtree before node git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@930 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/connectivity/class_oxchangeAccount.inc b/plugins/personal/connectivity/class_oxchangeAccount.inc index ff48e3f6b..0083e985d 100644 --- a/plugins/personal/connectivity/class_oxchangeAccount.inc +++ b/plugins/personal/connectivity/class_oxchangeAccount.inc @@ -708,15 +708,16 @@ class oxchangeAccount extends plugin plugin::remove_from_parent(); $ldap= $this->config->get_ldap_link(); + if($ldap->dn_exists("ou=addr,".$this->dn)){ + $ldap->rmdir("ou=addr,".$this->dn); + show_ldap_error($ldap->get_error()); + } + $ldap->cd($this->dn); @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__, $this->attributes, "Save"); $ldap->modify($this->attrs); show_ldap_error($ldap->get_error()); - if($ldap->dn_exists("ou=addr,".$this->dn)){ - $ldap->rmdir("ou=addr,".$this->dn); - show_ldap_error($ldap->get_error()); - } /* Optionally execute a command after we're done */ $this->postremove();