From: hickert Date: Wed, 12 Sep 2007 08:38:24 +0000 (+0000) Subject: Udpated zone editor X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f7f5136d9ca483ca48dc4980de42f7ce33eae9a1;p=gosa.git Udpated zone editor git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7278 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc index 584861e25..47911f434 100644 --- a/plugins/admin/systems/class_servDNSeditZoneEntries.inc +++ b/plugins/admin/systems/class_servDNSeditZoneEntries.inc @@ -72,6 +72,7 @@ class servDNSeditZoneEntries extends plugin foreach($this->Devices as $key => $dev){ $table .= $this->generateRecordConfigurationRow($key); } + print_a($this->Devices); $smarty->assign("disableDialog",$this->disableDialog); $smarty->assign("table",$table);; @@ -124,6 +125,18 @@ class servDNSeditZoneEntries extends plugin if(isset($this->Devices[$Name]['RECORDS'][$RecordID])){ unset($this->Devices[$Name]['RECORDS'][$RecordID]); } + + /* Check if there is at least one visible record. Else remove complete entry */ + $visible = false; + foreach($this->Devices[$Name]['RECORDS'] as $rec){ + if(in_array($rec['type'],$this->RecordTypes)){ + $visible = true; + break; + } + } + if(!$visible && isset($this->Devices[$Name]['RECORDS'])){ + $this->Devices[$Name]['RECORDS'] = array(); + } } } @@ -314,6 +327,7 @@ class servDNSeditZoneEntries extends plugin $todo = array(); + /* Create todolist */ foreach($this->Devices as $name => $dev){