From 89e4329a8068e3631d3f64f6896fa3907c687cf5 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Thu, 08 Jan 2015 09:08:50 -0500
Subject: [PATCH] Layout fix: tab toggle and monitor tables

---
 interface/web/dns/dns_srv_edit.php |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/interface/web/dns/dns_srv_edit.php b/interface/web/dns/dns_srv_edit.php
index 893fcd2..e2d0bea 100644
--- a/interface/web/dns/dns_srv_edit.php
+++ b/interface/web/dns/dns_srv_edit.php
@@ -38,8 +38,8 @@
 * End Form configuration
 ******************************************/
 
-require_once('../../lib/config.inc.php');
-require_once('../../lib/app.inc.php');
+require_once '../../lib/config.inc.php';
+require_once '../../lib/app.inc.php';
 
 //* Check permissions for module
 $app->auth->check_module_permissions('dns');
@@ -57,7 +57,7 @@
 		if($_SESSION["s"]["user"]["typ"] == 'user') {
 
 			// Get the limits of the client
-			$client_group_id = $_SESSION["s"]["user"]["default_group"];
+			$client_group_id = intval($_SESSION["s"]["user"]["default_group"]);
 			$client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
 
 			// Check if the user may add another mailbox.
@@ -78,17 +78,9 @@
 		// Split the 3 parts of the SRV Record apart
 		$split = explode(' ', $this->dataRecord['data']);
 
-		// Weight
-		$this->dataRecord['weight'] = $split[0];
-
-		// Port
-		$this->dataRecord['port'] = $split[1];
-
-		// Target
-		$this->dataRecord['target'] = $split[2];
-
-		// Bind the new datarecord to the template
-		$app->tpl->setVar($this->dataRecord);
+		$app->tpl->setVar('weight', $split[0]);
+		$app->tpl->setVar('port', $split[1]);
+		$app->tpl->setVar('target', $split[2]);
 
 		parent::onShowEnd();
 	}
@@ -159,6 +151,7 @@
 		$serial = $app->validate_dns->increase_serial($soa["serial"]);
 		$app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id);
 	}
+
 }
 
 $page = new page_action;

--
Gitblit v1.9.1