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:
Tuxis Internet Engineering V.O.F. 2015-05-28 13:32:21 +02:00
commit 6a9a05a187

View file

@ -604,8 +604,8 @@ case "editrecord":
$record = make_record($zone, $_POST);
if ($record['name'] !== $old_record['name']) {
# rename:
if ($record['name'] !== $old_record['name'] || $record['type'] !== $old_record['type']) {
# rename or retype:
$newRecords = get_records_by_name_type($zone, $record['name'], $record['type']);
array_push($newRecords, $record);
update_records($zone, $old_record, $records); # remove from old list