From 88d47d2ce65e549ffccda213f4e53609cc75d882 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Thu, 23 Jan 2014 05:31:58 -0500
Subject: [PATCH] Resolved differences in sql incremental files between master and stable

---
 interface/web/dns/dns_soa_del.php |   34 +++++++++++++++++++++++++---------
 1 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/interface/web/dns/dns_soa_del.php b/interface/web/dns/dns_soa_del.php
index 5cbb77f..f9a06fc 100644
--- a/interface/web/dns/dns_soa_del.php
+++ b/interface/web/dns/dns_soa_del.php
@@ -39,16 +39,32 @@
 * 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';
 
-// Checke Berechtigungen f�r Modul
-if(!stristr($_SESSION["s"]["user"]["modules"],'dns')) {
-	header("Location: ../index.php");
-	exit;
+//* Check permissions for module
+$app->auth->check_module_permissions('dns');
+
+$app->uses('tpl,tform,tform_actions');
+$app->load('tform_actions');
+
+class page_action extends tform_actions {
+
+	function onBeforeDelete() {
+		global $app; $conf;
+
+		if($app->tform->checkPerm($this->id, 'd') == false) $app->error($app->lng('error_no_delete_permission'));
+
+		// Delete all records that belog to this zone.
+		$records = $app->db->queryAllRecords("SELECT id FROM dns_rr WHERE zone = '".$app->functions->intval($this->id)."'");
+		foreach($records as $rec) {
+			$app->db->datalogDelete('dns_rr', 'id', $rec['id']);
+		}
+	}
+
 }
 
-$app->uses("tform_actions");
-$app->tform_actions->onDelete();
+$page = new page_action;
+$page->onDelete();
 
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1