If a template contains NS-records, do not try to add them again. They were already added while creating the zone.

This commit is contained in:
Mark Schouten 2020-12-23 11:45:58 +01:00
parent 888e7bad42
commit 5c6c9e1847

View file

@ -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']);