Skip to content

Commit 879aecb

Browse files
committed
Fixed: FS#830 - Duplicate A Record error.
1 parent 21dba7b commit 879aecb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/web/dns/dns_a_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function onSubmit() {
9797
} // end if user is not admin
9898

9999
//* Check for duplicates where IP and hostname are the same
100-
$tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE zone = '".$this->dataRecord["zone"]."' and data = '".$this->dataRecord["data"]."' and id != ".$this->id);
100+
$tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE type = 'A' AND name = '".$this->dataRecord["name"]."' AND zone = '".$this->dataRecord["zone"]."' and data = '".$this->dataRecord["data"]."' and id != ".$this->id);
101101
if($tmp['number'] > 0) $app->tform->errorMessage .= $app->tform->lng("data_error_duplicate")."<br>";
102102
unset($tmp);
103103

0 commit comments

Comments
 (0)