Code

Bug: removing subtree before node
authorblainett <blainett@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 7 Jul 2005 08:18:20 +0000 (08:18 +0000)
committerblainett <blainett@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 7 Jul 2005 08:18:20 +0000 (08:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@930 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/connectivity/class_oxchangeAccount.inc

index ff48e3f6b9f663250f104495866d99650614c5f2..0083e985d3bd67de8a9cc61cceff290596324dc0 100644 (file)
@@ -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();