From e1ceb050e19c7574bca146a8da7047ee4ff456b5 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Sun, 10 Jul 2016 05:02:35 -0400
Subject: [PATCH] Merge branch 'stable-3.1'

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

diff --git a/interface/web/dns/dns_soa_del.php b/interface/web/dns/dns_soa_del.php
index 0a1944b..fee2138 100644
--- a/interface/web/dns/dns_soa_del.php
+++ b/interface/web/dns/dns_soa_del.php
@@ -39,8 +39,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');
@@ -52,18 +52,19 @@
 
 	function onBeforeDelete() {
 		global $app; $conf;
-		
-		if($app->tform->checkPerm($this->id,'d') == false) $app->error($app->lng('error_no_delete_permission'));
-		
+
+		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 = '".intval($this->id)."'");
+		$records = $app->db->queryAllRecords("SELECT id FROM dns_rr WHERE zone = ?", $this->id);
 		foreach($records as $rec) {
-			$app->db->datalogDelete('dns_rr','id',$rec['id']);
+			$app->db->datalogDelete('dns_rr', 'id', $rec['id']);
 		}
 	}
+
 }
 
 $page = new page_action;
 $page->onDelete();
 
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1