mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
Merge pull request #49 from tuxis-ie/update-no-duplicate
This should fix the duplication of records when changing the recordtype. @sid3windr tested it and it seems to work.
This commit is contained in:
commit
6a9a05a187
1 changed files with 2 additions and 2 deletions
|
@ -604,8 +604,8 @@ case "editrecord":
|
||||||
|
|
||||||
$record = make_record($zone, $_POST);
|
$record = make_record($zone, $_POST);
|
||||||
|
|
||||||
if ($record['name'] !== $old_record['name']) {
|
if ($record['name'] !== $old_record['name'] || $record['type'] !== $old_record['type']) {
|
||||||
# rename:
|
# rename or retype:
|
||||||
$newRecords = get_records_by_name_type($zone, $record['name'], $record['type']);
|
$newRecords = get_records_by_name_type($zone, $record['name'], $record['type']);
|
||||||
array_push($newRecords, $record);
|
array_push($newRecords, $record);
|
||||||
update_records($zone, $old_record, $records); # remove from old list
|
update_records($zone, $old_record, $records); # remove from old list
|
||||||
|
|
Loading…
Add table
Reference in a new issue