Skip to content

Commit 36a1ba9

Browse files
author
Marius Burkard
committed
Apply 1 suggestion(s) to 1 file(s)
1 parent 5f20b27 commit 36a1ba9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interface/web/dns/dns_dmarc_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ 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 LIKE ? AND " . $app->tform->getAuthSQL('r');
92-
$rec = $app->db->queryOneRecord($sql, $zone, '_dmarc%');
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.'.');
9393
if (isset($rec) && !empty($rec) ) {
9494
$this->id = 1;
9595
$old_data = strtolower($rec['data']);

0 commit comments

Comments
 (0)