From 0e1c232373192147e56e5e6638986440d7ed3253 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Tue, 09 Jun 2009 03:57:50 -0400
Subject: [PATCH] Fixed: Input was not checked because of added dot (never was empty)

---
 interface/web/dns/dns_soa_edit.php |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/interface/web/dns/dns_soa_edit.php b/interface/web/dns/dns_soa_edit.php
index 0616c56..30464a2 100644
--- a/interface/web/dns/dns_soa_edit.php
+++ b/interface/web/dns/dns_soa_edit.php
@@ -128,9 +128,9 @@
 		$this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]);
 		
 		//* Check if soa, ns and mbox have a dot at the end
-		if(substr($this->dataRecord["origin"],-1,1) != '.') $this->dataRecord["origin"] .= '.';
-		if(substr($this->dataRecord["ns"],-1,1) != '.') $this->dataRecord["ns"] .= '.';
-		if(substr($this->dataRecord["mbox"],-1,1) != '.') $this->dataRecord["mbox"] .= '.';
+		if(strlen($this->dataRecord["origin"]) > 0 && substr($this->dataRecord["origin"],-1,1) != '.') $this->dataRecord["origin"] .= '.';
+		if(strlen($this->dataRecord["ns"]) > 0 && substr($this->dataRecord["ns"],-1,1) != '.') $this->dataRecord["ns"] .= '.';
+		if(strlen($this->dataRecord["mbox"]) > 0 && substr($this->dataRecord["mbox"],-1,1) != '.') $this->dataRecord["mbox"] .= '.';
 		
 		//* Replace @ in mbox
 		if(stristr($this->dataRecord["mbox"],'@')) {

--
Gitblit v1.9.1