From a0fd5ab7b5412985324e970573ca22a27b3a94d3 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 16 Apr 2013 05:56:06 -0400
Subject: [PATCH] - Merged revisions 3922-3958 from svn stable branch - Added backup size to web backups
---
interface/web/dns/dns_mx_edit.php | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/interface/web/dns/dns_mx_edit.php b/interface/web/dns/dns_mx_edit.php
index 73483f7..8ce9b87 100644
--- a/interface/web/dns/dns_mx_edit.php
+++ b/interface/web/dns/dns_mx_edit.php
@@ -119,6 +119,17 @@
parent::onInsert();
}
+ function onUpdate() {
+ global $app, $conf;
+
+ // Check if record is existing already
+ $duplicate_mx = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ".$app->functions->intval($this->dataRecord["zone"])." AND name = '".$this->dataRecord["name"]."' AND type = '".$this->dataRecord["type"]."' AND data = '".$this->dataRecord["data"]."' AND id != ".$app->functions->intval($this->dataRecord["id"])." AND ".$app->tform->getAuthSQL('r'));
+
+ if(is_array($duplicate_mx) && !empty($duplicate_mx)) $app->error($app->tform->wordbook["duplicate_mx_record_txt"]);
+
+ parent::onUpdate();
+ }
+
function onAfterInsert() {
global $app, $conf;
--
Gitblit v1.9.1