Skip to content

Commit 19b4e1e

Browse files
author
Till Brehm
committed
Merge branch 'develop' into 'develop'
Fixed dns cname validation query See merge request ispconfig/ispconfig3!1913
2 parents 8e3c5e5 + 2311285 commit 19b4e1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/web/dns/dns_cname_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class page_action extends dns_page_action {
4848
protected function checkDuplicate() {
4949
global $app;
5050
//* Check for duplicates where IP and hostname are the same
51-
$tmp = $app->db->queryOneRecord("SELECT count(dns_rr.id) as number FROM dns_rr LEFT JOIN dns_soa ON dns_rr.zone = dns_soa.id WHERE (( name = replace(?, concat('.', dns_soa.origin), '') or name = ? or name = concat(?,'.', dns_soa.origin)) and dns_rr.zone = ?)", $this->dataRecord["name"], $this->dataRecord["name"], $this->dataRecord["name"], $this->dataRecord["zone"], $this->dataRecord["zone"]);
51+
$tmp = $app->db->queryOneRecord("SELECT count(dns_rr.id) as number FROM dns_rr LEFT JOIN dns_soa ON dns_rr.zone = dns_soa.id WHERE (( name = replace(?, concat('.', dns_soa.origin), '') or name = ? or name = concat(?,'.', dns_soa.origin)) and dns_rr.zone = ? and dns_rr.id != ?)", $this->dataRecord["name"], $this->dataRecord["name"], $this->dataRecord["name"], $this->dataRecord["zone"], $this->id);
5252
if($tmp['number'] > 0) return true;
5353
return false;
5454
}

0 commit comments

Comments
 (0)