Skip to content

Commit

Permalink
fmDNS - #409 - Fixed multiple NAPTR record values
Browse files Browse the repository at this point in the history
  • Loading branch information
WillyXJ committed Mar 8, 2018
1 parent 00b8a7d commit 3b65a65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/fm-modules/fmDNS/change.log
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Server - [bug] Fixed a fatal error during client interactions.
* Server - [bug] Fixed automatic PTR creations when using a class A reverse
zone. (Issue #408)
* Server - [bug] Fixed support for multiple NAPTR record values. (Issue #409)

3.1.1 (2017-12-14)
==================
Expand Down
3 changes: 3 additions & 0 deletions server/fm-modules/fmDNS/classes/class_records.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ function add($domain_id, $record_type, $new_array, $operation = 'insert') {
if ($record_type != 'SOA') {
$query = "SELECT * FROM fm_{$__FM_CONFIG['fmDNS']['prefix']}records WHERE domain_id=$domain_id AND record_name='{$new_array['record_name']}'
AND record_value='{$new_array['record_value']}' AND record_type='$record_type' AND record_status != 'deleted'";
if ($record_type == 'NAPTR') {
$query .= " AND record_params='{$new_array['record_params']}' AND record_regex='{$new_array['record_regex']}'";
}
$result = $fmdb->get_results($query);

if ($fmdb->num_rows) {
Expand Down

0 comments on commit 3b65a65

Please sign in to comment.