From 5ca959fa688255a8de61f89fe2751eb4d24a6912 Mon Sep 17 00:00:00 2001 From: Florian Schaal <florian@schaal-24.de> Date: Tue, 22 Mar 2016 09:22:07 -0400 Subject: [PATCH] fixed typo --- interface/lib/classes/validate_dns.inc.php | 17 ++--------------- 1 files changed, 2 insertions(+), 15 deletions(-) diff --git a/interface/lib/classes/validate_dns.inc.php b/interface/lib/classes/validate_dns.inc.php index 212c4d7..4875928 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 = ".intval($zoneid)); + $soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ?", $zoneid); if(substr($field, (strlen($field) - strlen($soa['origin']))) != $soa['origin']) $error .= $desc." ".$app->tform->wordbook['error_out_of_zone']."<br>\r\n"; } @@ -309,20 +309,7 @@ $errmsg = $validator['errmsg']; $errorMessage .= $app->tform->lng($errmsg)."<br />\r\n"; } - } else { - //* Check content with regex, if we use php < 5.2 - $ip_ok = 0; - if(preg_match("/^(\:\:([a-f0-9]{1,4}\:){0,6}?[a-f0-9]{0,4}|[a-f0-9]{1,4}(\:[a-f0-9]{1,4}){0,6}?\:\:|[a-f0-9]{1,4}(\:[a-f0-9]{1,4}){1,6}?\:\:([a-f0-9]{1,4}\:){1,6}?[a-f0-9]{1,4})(\/\d{1,3})?$/i", $field_value)){ - $ip_ok = 1; - } - if(preg_match("/^[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}$/", $field_value)){ - $ip_ok = 1; - } - if($ip_ok == 0) { - $errmsg = $validator['errmsg']; - $errorMessage .= $app->tform->lng($errmsg)."<br />\r\n"; - } - } + } else $this->errorMessage .= "function filter_var missing <br />\r\n"; } } return $errorMessage; -- Gitblit v1.9.1