From: hickert Date: Tue, 16 Jan 2007 07:57:05 +0000 (+0000) Subject: Updated remove from parent. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4941a46c8bd35a29360dc7c438b5e403a6623ad8;p=gosa.git Updated remove from parent. Removed unused code from template git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5572 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDNS.inc b/plugins/admin/systems/class_servDNS.inc index 2a27325dd..b433a734c 100644 --- a/plugins/admin/systems/class_servDNS.inc +++ b/plugins/admin/systems/class_servDNS.inc @@ -253,25 +253,26 @@ class servdns extends plugin } - /* Remove dns service + + /* Remove dns service */ function remove_from_parent() { - if(!$this->DNSinitially_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){ + $bool = true; + foreach($this->Zones as $key => $zone){ + $bool= $bool & $this->RemoveZone($key); + } + + if($bool){ + $this->save(); + } + return($bool); } - show_ldap_error($ldap->get_error(), _("Removing DNS service failed")); } + /* Save to LDAP */ function save() { diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc index 21c334d69..89b4538e7 100644 --- a/plugins/admin/systems/class_servDNSeditZoneEntries.inc +++ b/plugins/admin/systems/class_servDNSeditZoneEntries.inc @@ -284,7 +284,6 @@ class servDNSeditZoneEntries extends plugin $todo = array(); - print_a($this->Devices); /* Create todolist */ diff --git a/plugins/admin/systems/servdns.tpl b/plugins/admin/systems/servdns.tpl index 7cd08b7d9..1a0eaf280 100644 --- a/plugins/admin/systems/servdns.tpl +++ b/plugins/admin/systems/servdns.tpl @@ -4,8 +4,8 @@ {$ZoneList} - - + +