summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/validate.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/include/validate.inc.php')
-rw-r--r--frontends/php/include/validate.inc.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/frontends/php/include/validate.inc.php b/frontends/php/include/validate.inc.php
index 4de30e9a..39e9a66f 100644
--- a/frontends/php/include/validate.inc.php
+++ b/frontends/php/include/validate.inc.php
@@ -19,6 +19,13 @@
**/
?>
<?php
+
+ function unset_request($key)
+ {
+// SDI("unset: $key");
+ unset($_REQUEST[$key]);
+ }
+
define('ZBX_VALID_OK', 0);
define('ZBX_VALID_ERROR', 1);
define('ZBX_VALID_WARNING', 2);
@@ -100,8 +107,7 @@
{
if(!isset($fields[$key]))
{
-//echo "Unset: $key<br>";
- unset($_REQUEST[$key]);
+ unset_request($key);
}
}
}
@@ -114,8 +120,7 @@
if(($flags&P_NZERO)&&(isset($_REQUEST[$field]))&&($_REQUEST[$field]==0))
{
-//echo "Unset: $field<br>";
- unset($_REQUEST[$field]);
+ unset_request($field);
}
}
}
@@ -129,8 +134,7 @@
if(($flags&P_ACT)&&(isset($_REQUEST[$field])))
{
-//echo "Unset:".$field."<br>";
- unset($_REQUEST[$field]);
+ unset_request($field);
}
}
}
@@ -139,8 +143,7 @@
{
foreach($_REQUEST as $key => $val)
{
-//echo "Unset:".$key."<br>";
- unset($_REQUEST[$key]);
+ unset_request($key);
}
}
@@ -231,8 +234,7 @@
if(!isset($_REQUEST[$field]))
return ZBX_VALID_OK;
-//echo "Unset:".$field."<br>";
- unset($_REQUEST[$field]);
+ unset_request($field);
if($flags&P_SYS)
{