From 2bd7372b464fa0e127a2de5c700645272930146c Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 12 Sep 2007 08:39:00 +0000 Subject: [PATCH] Uadpted dns zone editor git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7279 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_servDNSeditZoneEntries.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc index bb6213504..b87d22c1e 100644 --- a/plugins/admin/systems/class_servDNSeditZoneEntries.inc +++ b/plugins/admin/systems/class_servDNSeditZoneEntries.inc @@ -75,6 +75,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);; @@ -127,6 +128,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(); + } } } @@ -313,6 +326,7 @@ class servDNSeditZoneEntries extends plugin $todo = array(); + /* Create todolist */ foreach($this->Devices as $name => $dev){ -- 2.30.2