From 3f478f7b37eb314c7dba33af10e8d32d5f2fa579 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 19 Apr 2013 05:35:57 -0400
Subject: [PATCH] Merged revisions 3922-3958 from stable branch.

---
 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