Verified Commit fb51a16f authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(dns) Remove DNS tab when there are no more zones

If the foreign key on a zone removes the last zone, deactivate the DNS
 tab of the system.

issue #6031
Showing with 8 additions and 0 deletions
+8 -0
......@@ -518,6 +518,14 @@ class dnsHost extends simplePlugin
}
}
function foreignKeyUpdate (string $field, $oldvalue, $newvalue, array $source)
{
parent::foreignKeyUpdate($field, $oldvalue, $newvalue, $source);
if (empty($this->fdDNSZoneDn)) {
$this->is_account = FALSE;
}
}
/* Record example: array('host', 'aRecord', '192.168.1.1', '')
* Fields are relativeDomainName, record type, record content, reverse zone (for a/aaaa) */
function addRecord ($zoneDn, array $record)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment