From 8536f368e086d61cc50e9b08d514886110891e3d Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Wed, 27 Mar 2013 09:28:57 -0400
Subject: [PATCH] - Fixed FS#2723 - ISPConfig doesn't allow multiple Slave DNS zones on different servers.
---
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