This should fix the duplication of records when changing the recordtype

This commit is contained in:
Mark Schouten 2015-05-18 13:52:30 +02:00
parent cc9b227a70
commit c7ae7f5de1

View file

@ -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