diff --git a/interface/web/dns/dns_edit_base.php b/interface/web/dns/dns_edit_base.php index 61c08f6576a9f6eff032b249728d2a0e2210d56e..a4e314381aedddac19dd5e6c7aee7f6abd15e485 100644 --- a/interface/web/dns/dns_edit_base.php +++ b/interface/web/dns/dns_edit_base.php @@ -41,6 +41,10 @@ $app->load('tform_actions'); class dns_page_action extends tform_actions { protected function checkDuplicate() { + global $app; + // If a CNAME RR is present at a node, no other data should be present + $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE (type = 'CNAME' AND name = ? AND zone = ? and id != ?)", $this->dataRecord["name"], $this->dataRecord["zone"], $this->id); + if($tmp['number'] > 0) return true; return false; }