summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/validate.inc.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-31 16:09:35 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-31 16:09:35 +0000
commitd07f777ed2cf0103ed550166f9b0e783db064255 (patch)
treefb331ae19aff60bdf2cea11bd99e34a99f45bc1d /frontends/php/include/validate.inc.php
parent78776cf62621df9e12f0b791753174e638440efe (diff)
downloadzabbix-d07f777ed2cf0103ed550166f9b0e783db064255.tar.gz
zabbix-d07f777ed2cf0103ed550166f9b0e783db064255.tar.xz
zabbix-d07f777ed2cf0103ed550166f9b0e783db064255.zip
Getting rid of addslashes.
git-svn-id: svn://svn.zabbix.com/trunk@2592 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/validate.inc.php')
-rw-r--r--frontends/php/include/validate.inc.php21
1 files changed, 12 insertions, 9 deletions
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 @@
**/
?>
<?php
+ function zbx_adds($var)
+ {
+ if(!get_magic_quotes_gpc()) return addslashes($var);
+ else return $var;
+ }
+
function BETWEEN($min,$max)
{
return "({}>=$min&&{}<=$max)&&";
@@ -73,7 +79,7 @@
{
if(!isset($fields[$key]))
{
-//// echo "Unset: $key<br>";
+ echo "Unset: $key<br>";
unset($_REQUEST[$key]);
}
}
@@ -103,6 +109,7 @@
if(($flags&P_ACT)&&(isset($_REQUEST[$field])))
{
// info("Unset:".$field);
+ echo "Unset:".$field."<br>";
unset($_REQUEST[$field]);
}
}
@@ -112,6 +119,8 @@
{
foreach($_REQUEST as $key => $val)
{
+// info("Unset:".$_REQUEST[$key]);
+ echo "Unset:".$_REQUEST[$key]."<br>";
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<br>";
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;
}
?>