From e32ee04e7c54f8ba599e0a79a89381d49bfc4f2b Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 21 Jun 2006 04:04:22 +0000 Subject: [PATCH] Allow remove of dns extension git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3836 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_servDNS.inc | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/plugins/admin/systems/class_servDNS.inc b/plugins/admin/systems/class_servDNS.inc index 155966473..b290bd14b 100644 --- a/plugins/admin/systems/class_servDNS.inc +++ b/plugins/admin/systems/class_servDNS.inc @@ -253,18 +253,15 @@ class servdns extends plugin */ function remove_from_parent() { - if(!$this->initially_was_account){ - return; - } - print_red("Can't remove dns yet. returning without remove."); - return; - $ldap = $this->config->get_ldap_link(); - $ldap->ls("(&(objectClass=dNSZone)(zoneName=*)(relativeDomainName=@))",$this->orig_dn,array("relativeDomainName","zoneName")); - while($attr = $ldap->fetch()){ - $ldap->cd($attr['dn']); - $ldap->rmDir($attr['dn']); + if($this->initially_was_account){ + $ldap = $this->config->get_ldap_link(); + $ldap->ls("(&(objectClass=dNSZone)(zoneName=*)(relativeDomainName=@))",$this->orig_dn,array("relativeDomainName","zoneName")); + while($attr = $ldap->fetch()){ + $ldap->cd($attr['dn']); + $ldap->rmdir_recursive($attr['dn']); + } + show_ldap_error($ldap->get_error(), _("Removing DNS service failed")); } - show_ldap_error($ldap->get_error(), _("Removing DNS service failed")); } -- 2.30.2