From d07f777ed2cf0103ed550166f9b0e783db064255 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Tue, 31 Jan 2006 16:09:35 +0000 Subject: Getting rid of addslashes. git-svn-id: svn://svn.zabbix.com/trunk@2592 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/validate.inc.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'frontends/php/include/validate.inc.php') diff --git a/frontends/php/include/validate.inc.php b/frontends/php/include/validate.inc.php index 35196f9d..ff0279d2 100644 --- a/frontends/php/include/validate.inc.php +++ b/frontends/php/include/validate.inc.php @@ -19,6 +19,12 @@ **/ ?> =$min&&{}<=$max)&&"; @@ -73,7 +79,7 @@ { if(!isset($fields[$key])) { -//// echo "Unset: $key
"; + echo "Unset: $key
"; unset($_REQUEST[$key]); } } @@ -103,6 +109,7 @@ if(($flags&P_ACT)&&(isset($_REQUEST[$field]))) { // info("Unset:".$field); + echo "Unset:".$field."
"; unset($_REQUEST[$field]); } } @@ -112,6 +119,8 @@ { foreach($_REQUEST as $key => $val) { +// info("Unset:".$_REQUEST[$key]); + echo "Unset:".$_REQUEST[$key]."
"; unset($_REQUEST[$key]); } } @@ -122,15 +131,13 @@ $ret = TRUE; - return $ret; - $critical = FALSE; foreach($fields as $field => $checks) { list($type,$opt,$flags,$validation,$exception)=$checks; -// info("Field: $field"); +// echo "Field: $field
"; if($exception==NULL) $except=FALSE; else $except=calc_exp($fields,$field,$exception); @@ -241,10 +248,6 @@ } } } - - if(isset($_REQUEST[$field])&&!get_magic_quotes_gpc()) { - $_REQUEST[$field]=addslashes($_REQUEST[$field]); - } } unset_not_in_list($fields); unset_if_zero($fields); @@ -258,7 +261,7 @@ { unset_action_vars($fields); } - show_messages(); + show_infomsg(); return $ret; } ?> -- cgit