Skip to content

Commit 4d17362

Browse files
author
thom
committed
Allow setting dnssec_wanted in wizard template (#5856)
1 parent 505be17 commit 4d17362

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

interface/web/dns/dns_wizard.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,9 @@
323323
if($_POST['ns1'] != '') $tpl_content = str_replace('{NS1}', $_POST['ns1'], $tpl_content);
324324
if($_POST['ns2'] != '') $tpl_content = str_replace('{NS2}', $_POST['ns2'], $tpl_content);
325325
if($_POST['email'] != '') $tpl_content = str_replace('{EMAIL}', $_POST['email'], $tpl_content);
326-
$enable_dnssec = (($_POST['dnssec'] == 'Y') ? 'Y' : 'N');
326+
// $enable_dnssec = (($_POST['dnssec'] == 'Y') ? 'Y' : 'N');
327+
// if(isset($_POST['dnssec'])) $vars['dnssec_wanted'] = 'Y';
328+
if(isset($_POST['dnssec'])) $tpl_content = str_replace('[ZONE]', '[ZONE]'."\n".'dnssec_wanted=Y', $tpl_content);
327329
if(isset($_POST['dkim']) && preg_match('/^[\w\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,63}[\.]{0,1}$/', $_POST['domain'])) {
328330
$sql = $app->db->queryOneRecord("SELECT dkim_public, dkim_selector FROM mail_domain WHERE domain = ? AND dkim = 'y' AND ".$app->tform->getAuthSQL('r'), $_POST['domain']);
329331
$public_key = $sql['dkim_public'];
@@ -339,6 +341,7 @@
339341
$section = '';
340342
$vars = array();
341343
$vars['xfer']='';
344+
$vars['dnssec_wanted']='';
342345
$vars['dnssec_algo']='ECDSAP256SHA256';
343346
$dns_rr = array();
344347
foreach($tpl_rows as $row) {
@@ -399,6 +402,7 @@
399402
$xfer = $vars['xfer'];
400403
$also_notify = $vars['also_notify'];
401404
$update_acl = $vars['update_acl'];
405+
$dnssec_wanted = $vars['dnssec_wanted'];
402406
$dnssec_algo = $vars['dnssec_algo'];
403407
$serial = $app->validate_dns->increase_serial(0);
404408

@@ -422,7 +426,7 @@
422426
"xfer" => $xfer,
423427
"also_notify" => $also_notify,
424428
"update_acl" => $update_acl,
425-
"dnssec_wanted" => $enable_dnssec,
429+
"dnssec_wanted" => $dnssec_wanted,
426430
"dnssec_algo" => $dnssec_algo
427431
);
428432
$dns_soa_id = $app->db->datalogInsert('dns_soa', $insert_data, 'id');

0 commit comments

Comments
 (0)