From 5c6c9e18473423c5949420cce95c45dffb8ab020 Mon Sep 17 00:00:00 2001 From: Mark Schouten Date: Wed, 23 Dec 2020 11:45:58 +0100 Subject: [PATCH] If a template contains NS-records, do not try to add them again. They were already added while creating the zone. --- zones.php | 1 + 1 file changed, 1 insertion(+) diff --git a/zones.php b/zones.php index 0234a62..dd7f674 100644 --- a/zones.php +++ b/zones.php @@ -330,6 +330,7 @@ case "create": $api->savezone($zone->export()); foreach ($template['records'] as $record) { + if ($record['type'] == 'NS') continue; $name = $record['name'] != '' ? join(Array($record['name'],'.',$zonename)) : $zonename; $record['content'] = str_replace("[zonename]", $zonename, $record['content']); $zone->addRecord($name, $record['type'], $record['content']);