From 566c28a952bf361ba9a22d7c39d5c335f6956ab2 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Wed, 29 Jun 2016 11:42:36 -0400
Subject: [PATCH] Added "DATE" form type that works like the "DATETIME" type incl. date picker, just without time details.

---
 interface/lib/classes/validate_database.inc.php |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/interface/lib/classes/validate_database.inc.php b/interface/lib/classes/validate_database.inc.php
index b12405f..c789b6a 100644
--- a/interface/lib/classes/validate_database.inc.php
+++ b/interface/lib/classes/validate_database.inc.php
@@ -44,17 +44,11 @@
 				$cur_value = trim($cur_value);
 				$valid = true;
 				if(function_exists('filter_var')) {
-					if(!filter_var($field_value, FILTER_VALIDATE_IP)) {
+					if(!filter_var($cur_value, FILTER_VALIDATE_IP)) {
 						$valid = false;
 					}
-				} else {
-					 if(
-						!preg_match("/^[0-9a-f]{1,4}:([0-9a-f]{0,4}:){1,6}[0-9a-f]{1,4}$/", $cur_value)
-						&&
-						!preg_match("/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/", $cur_value)) {
-							$valid = false;
-					}
-				}
+				} else return "function filter_var missing <br />\r\n";
+
 				if($valid == false) {
 					$errmsg = $validator['errmsg'];
 					if(isset($app->tform->wordbook[$errmsg])) {

--
Gitblit v1.9.1