mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
This should fix the duplication of records when changing the recordtype
This commit is contained in:
parent
cc9b227a70
commit
c7ae7f5de1
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