From 3ba56480d4e7ba4f9fffa2062dbca5cb41a5bb01 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 03 Jan 2014 09:26:34 -0500
Subject: [PATCH] Implemented: FS#2837 - New functions for the API

---
 interface/lib/classes/validate_dns.inc.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/lib/classes/validate_dns.inc.php b/interface/lib/classes/validate_dns.inc.php
index 99ff6c5..413be16 100644
--- a/interface/lib/classes/validate_dns.inc.php
+++ b/interface/lib/classes/validate_dns.inc.php
@@ -104,7 +104,7 @@
 		}
 
 		if(substr($field, -1) == '.' && $area == 'Name'){
-			$soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ".$zoneid);
+			$soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ".intval($zoneid));
 			if(substr($field, (strlen($field) - strlen($soa['origin']))) != $soa['origin']) $error .= $desc." ".$app->tform->wordbook['error_out_of_zone']."<br>\r\n";
 		}
 
@@ -267,7 +267,7 @@
 		global $app, $conf;
 
 		// increase serial
-		$serial_date = substr($serial, 0, 8);
+		$serial_date = $app->functions->intval(substr($serial, 0, 8));
 		$count = $app->functions->intval(substr($serial, 8, 2));
 		$current_date = date("Ymd");
 		if($serial_date >= $current_date){

--
Gitblit v1.9.1