From e95eee318be549c8b8e1d38025ae872dba230f89 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Mon, 02 Dec 2013 13:31:56 -0500
Subject: [PATCH] allow dkim-public-key in dns only for mail-domains with dkim enabed.
---
interface/web/dns/dns_dkim_edit.php | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/interface/web/dns/dns_dkim_edit.php b/interface/web/dns/dns_dkim_edit.php
index 6bc3086..1735473 100644
--- a/interface/web/dns/dns_dkim_edit.php
+++ b/interface/web/dns/dns_dkim_edit.php
@@ -97,7 +97,7 @@
$this->dataRecord["server_id"] = $soa["server_id"];
// add dkim-settings to the public-key in the txt-record
- $this->dataRecord['data']='v=DKIM1; t=s; p='.$this->dataRecord['data'];
+ if (!empty($this->dataRecord['data'])) $this->dataRecord['data']='v=DKIM1; t=s; p='.$this->dataRecord['data'];
$this->dataRecord['name']='default._domainkey.'.$this->dataRecord['name'];
// Update the serial number and timestamp of the RR record
@@ -108,7 +108,7 @@
// check for duplicate entry
$check=$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ".$this->dataRecord["zone"]." AND type = '".$this->dataRecord["type"]."' AND data ='".$this->dataRecord["data"]."' AND name = '".$this->dataRecord['name']."'");
if ($check!='') $app->tform->errorMessage .= $app->tform->wordbook["record_exists_txt"];
-
+ if (empty($this->dataRecord['data'])) $app->tform->errorMessage .= $app->tform->wordbook["dkim_disabled_txt"];
parent::onSubmit();
}
--
Gitblit v1.9.1