Skip to content

Commit 505be17

Browse files
author
Marius Burkard
committed
Merge branch '5821-dmarc-open' into 'develop'
Open existing DMARC record instead of new one if one exists (#5821) Closes #5821 See merge request ispconfig/ispconfig3!1263
2 parents 08ba875 + 36a1ba9 commit 505be17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

interface/web/dns/dns_dmarc_edit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ function onShowEnd() {
8888
$dmarc_sp = 'same';
8989

9090
//* check for an existing dmarc-record
91-
$sql = "SELECT data, active FROM dns_rr WHERE data LIKE 'v=DMARC1%' AND zone = ? AND name = ? AND " . $app->tform->getAuthSQL('r');
92-
$rec = $app->db->queryOneRecord($sql, $zone, '_dmarc.'.$domain_name.'.');
93-
if ( isset($rec) && !empty($rec) ) {
91+
$sql = "SELECT data, active FROM dns_rr WHERE data LIKE 'v=DMARC1%' AND zone = ? AND name LIKE ? AND " . $app->tform->getAuthSQL('r') . " ORDER BY (name = ?) DESC";
92+
$rec = $app->db->queryOneRecord($sql, $zone, '_dmarc%', '_dmarc.'.$domain_name.'.');
93+
if (isset($rec) && !empty($rec) ) {
9494
$this->id = 1;
9595
$old_data = strtolower($rec['data']);
9696
$app->tpl->setVar("data", $old_data, true);

0 commit comments

Comments
 (0)