Skip to content
Snippets Groups Projects
Commit 505be171 authored by Marius Burkard's avatar Marius Burkard
Browse files

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
parents 08ba875c 36a1ba92
No related branches found
No related tags found
No related merge requests found
...@@ -88,9 +88,9 @@ class page_action extends tform_actions { ...@@ -88,9 +88,9 @@ class page_action extends tform_actions {
$dmarc_sp = 'same'; $dmarc_sp = 'same';
//* check for an existing dmarc-record //* check for an existing dmarc-record
$sql = "SELECT data, active FROM dns_rr WHERE data LIKE 'v=DMARC1%' AND zone = ? AND name = ? AND " . $app->tform->getAuthSQL('r'); $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";
$rec = $app->db->queryOneRecord($sql, $zone, '_dmarc.'.$domain_name.'.'); $rec = $app->db->queryOneRecord($sql, $zone, '_dmarc%', '_dmarc.'.$domain_name.'.');
if ( isset($rec) && !empty($rec) ) { if (isset($rec) && !empty($rec) ) {
$this->id = 1; $this->id = 1;
$old_data = strtolower($rec['data']); $old_data = strtolower($rec['data']);
$app->tpl->setVar("data", $old_data, true); $app->tpl->setVar("data", $old_data, true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment