From dd0130670fe3cab4c7e2c1ab4f3bf0d2b2d512b0 Mon Sep 17 00:00:00 2001 From: Denny Bortfeldt <denny@bortfeldt.net> Date: Mon, 27 Jun 2016 18:02:16 -0400 Subject: [PATCH] When uploading a logo which is smaller than the current ispconfig one, then the logo will be on the left side of the header. In my opinion it will look better when it's centered. You could vote about it ;) --- interface/lib/classes/validate_database.inc.php | 14 ++++---------- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/interface/lib/classes/validate_database.inc.php b/interface/lib/classes/validate_database.inc.php index e348afe..c789b6a 100644 --- a/interface/lib/classes/validate_database.inc.php +++ b/interface/lib/classes/validate_database.inc.php @@ -42,18 +42,12 @@ $values = explode(",", $field_value); foreach($values as $cur_value) { $cur_value = trim($cur_value); - $valid = true; -// if(preg_match("/^[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}$/", $cur_value)) { - if(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)) { - $groups = explode(".", $cur_value); - foreach($groups as $group){ - if($group<0 or $group>255) - $valid=false; + if(function_exists('filter_var')) { + if(!filter_var($cur_value, FILTER_VALIDATE_IP)) { + $valid = false; } - } else { - $valid = false; - } + } else return "function filter_var missing <br />\r\n"; if($valid == false) { $errmsg = $validator['errmsg']; -- Gitblit v1.9.1