diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc
index bb6213504e15bd112d0f3b43d31cd67be27fd2f7..8453ae794e3322bd5fd1e648f050131246d5f74c 100644 (file)
var $disableDialog = false; // Dialog will be disabled, if this zone is new
- function servDNSeditZoneEntries ($config,$dn, $zoneObject)
+ function servDNSeditZoneEntries (&$config,$dn, &$zoneObject)
{
plugin::plugin ($config, $dn);
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();
+ }
}
}
if(!isset($tmp[$Rec['type']])){
$tmp[$Rec['type']] = "";
}else{
- $message[] = sprintf(_("The record type '%s' is a unique type and can't be defined twice."),$type);
+ $message[] = sprintf(_("The record type '%s' is a unique type and can't be defined twice."),$Rec['type']);
}
}
$todo = array();
+
/* Create todolist
*/
foreach($this->Devices as $name => $dev){