You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interface/web/dns/dns_spf_edit.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -229,7 +229,7 @@ function onSubmit() {
229
229
$this->dataRecord["stamp"] = date('Y-m-d H:i:s');
230
230
231
231
// always update an existing entry
232
-
$check=$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ? AND type = ? AND data LIKE 'v=spf1%' AND name = ?", $this->dataRecord["zone"], $this->dataRecord["type"], $this->dataRecord['name'].'.');
232
+
$check=$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ? AND type = ? AND data LIKE 'v=spf1%' AND name = ?", $this->dataRecord["zone"], $this->dataRecord["type"], $this->dataRecord['name']);
233
233
$this->id = $check['id'];
234
234
235
235
if (!isset($this->dataRecord['active'])) $this->dataRecord['active'] = 'N';
$soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $this->dataRecord['domain'].'.');
302
+
if ( isset($soa) && !empty($soa) ) $this->update_dns($this->dataRecord, $soa);
$soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $this->dataRecord['domain']);
416
+
$soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $this->dataRecord['domain'].'.');
411
417
412
418
if ( ($selector || $dkim_private || $dkim_active) && $dkim_active )
413
419
//* create a new record only if the dns-zone exists
414
420
if ( isset($soa) && !empty($soa) ) {
415
421
$this->update_dns($this->dataRecord, $soa);
416
422
}
417
-
elseif ( !isset($this->dataRecord['dkim']) ) {
423
+
if (! $dkim_active) {
418
424
// updated existing dmarc-record to policy 'none'
419
-
$sql = "SELECT * from dns_rr WHERE name ='_dmarc.?.' AND data LIKE 'v=DMARC1%' AND ?";
0 commit comments