Skip to content
Snippets Groups Projects
Commit eb35b585 authored by Marius Cramer's avatar Marius Cramer
Browse files

Merge branch 'master' of git.ispconfig.org:ispconfig/ispconfig3

parents acd2383d 8684fba8
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,7 @@ require_once './dns_edit_base.php';
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 != ?)", $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;
......
......@@ -46,6 +46,7 @@ require_once './dns_edit_base.php';
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 = 'CNAME' 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment