diff --git a/interface/web/dns/dns_a_edit.php b/interface/web/dns/dns_a_edit.php index 19cb7d1c01fedb748e03989fbd94b2ef89a885f1..595ebcc92c4c0bfad88970f31f1b9be830be81fd 100644 --- a/interface/web/dns/dns_a_edit.php +++ b/interface/web/dns/dns_a_edit.php @@ -48,7 +48,7 @@ class page_action extends dns_page_action { protected function checkDuplicate() { global $app; //* Check for duplicates where IP and hostname are the same - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE (type = 'A' AND name = ? AND zone = ? and data = ? and id != ?) OR (type = 'CNAME' AND name = ? AND zone = ? and id != ?) OR (type = 'DNAME' AND name = ? AND zone = ? and id != ?)", $this->dataRecord["name"], $this->dataRecord["zone"], $this->dataRecord["data"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id); + $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE (type = 'A' AND name = ? AND zone = ? and data = ? and id != ?) OR (type = 'CNAME' AND name = ? AND zone = ? and id != ?)", $this->dataRecord["name"], $this->dataRecord["zone"], $this->dataRecord["data"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id); if($tmp['number'] > 0) return true; return false; } diff --git a/interface/web/dns/dns_aaaa_edit.php b/interface/web/dns/dns_aaaa_edit.php index 7d6972854fc16af75dfe45bc9804b723a8dd7da9..780fbcc80efca2386b2e1a9ca76776b4f592c284 100644 --- a/interface/web/dns/dns_aaaa_edit.php +++ b/interface/web/dns/dns_aaaa_edit.php @@ -48,7 +48,7 @@ class page_action extends dns_page_action { protected function checkDuplicate() { global $app; //* Check for duplicates where IP and hostname are the same - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE (type = 'AAAA' AND name = ? AND zone = ? and data = ? and id != ?) OR (type = 'CNAME' AND name = ? AND zone = ? and id != ?) OR (type = 'DNAME' AND name = ? AND zone = ? and id != ?)", $this->dataRecord["name"], $this->dataRecord["zone"], $this->dataRecord["data"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id); + $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE (type = 'AAAA' AND name = ? AND zone = ? and data = ? and id != ?) OR (type = 'CNAME' AND name = ? AND zone = ? and id != ?)", $this->dataRecord["name"], $this->dataRecord["zone"], $this->dataRecord["data"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id); if($tmp['number'] > 0) return true; return false; } diff --git a/interface/web/dns/dns_dname_edit.php b/interface/web/dns/dns_dname_edit.php index c33c0cce71ad808c20789842ee9af35cb79f9b8b..b4cd8ffaeafeb56aec1f2ca2b7350f3a6e11a53d 100644 --- a/interface/web/dns/dns_dname_edit.php +++ b/interface/web/dns/dns_dname_edit.php @@ -48,7 +48,7 @@ class page_action extends dns_page_action { protected function checkDuplicate() { global $app; //* Check for duplicates where IP and hostname are the same - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE (type = 'A' AND name = ? AND zone = ? and id != ?) OR (type = 'AAAA' AND name = ? AND zone = ? and id != ?) OR (type = 'CNAME' AND name = ? AND zone = ? and id != ?) OR (type = 'DNAME' AND name = ? AND zone = ? and id != ?)", $this->dataRecord["name"], $this->dataRecord["zone"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id); + $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE (type = 'CNAME' AND name = ? AND zone = ? and id != ?) OR (type = 'DNAME' AND name = ? AND zone = ? and id != ?)", $this->dataRecord["name"], $this->dataRecord["zone"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id); if($tmp['number'] > 0) return true; return false; }