From f19308703c8769cd943dfcef416484c3353fd5fb Mon Sep 17 00:00:00 2001
From: Sebastien JEAN <sebastien.jean54@gmail.com>
Date: Mon, 18 Nov 2013 06:35:58 -0500
Subject: [PATCH] fixing editing dns, mail, db and web domain servers by client issue
---
interface/web/dns/dns_soa_edit.php | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/interface/web/dns/dns_soa_edit.php b/interface/web/dns/dns_soa_edit.php
index 6afb39b..fd051d4 100644
--- a/interface/web/dns/dns_soa_edit.php
+++ b/interface/web/dns/dns_soa_edit.php
@@ -171,7 +171,13 @@
}
// When the record is updated
- if(!($this->id > 0)) {
+ if($this->id > 0) {
+ // restore the server ID if the user is not admin and record is edited
+ $tmp = $app->db->queryOneRecord("SELECT server_id FROM dns_soa WHERE id = ".$app->functions->intval($this->id));
+ $this->dataRecord["server_id"] = $tmp["server_id"];
+ unset($tmp);
+ // When the record is inserted
+ } else {
// Check if the user may add another maildomain.
if($client["limit_dns_zone"] >= 0) {
$tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_soa WHERE sys_groupid = $client_group_id");
--
Gitblit v1.9.1