diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-06-04 20:21:29 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-06-04 20:21:29 +0000 |
| commit | c556043bf06a4ec319aadebdd41cacb318e4b0c6 (patch) | |
| tree | c35158661021d49f0b7287d26051d40e11f3bc78 /frontends/php/include | |
| parent | 804a1b0eb7096d491f997fcafc4c545d9498618f (diff) | |
- trigger expressions may contain spaces (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1817 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/config.inc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index d3972a1f..0aba7e7a 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -761,7 +761,7 @@ function validate_float($str) { // echo "Validating float:$str<br>"; - if (eregi('^([0-9]+)((\.)?)([0-9]*[KMG]{0,1})$', $str, &$arr)) + if (eregi('^[ ]*([0-9]+)((\.)?)([0-9]*[KMG]{0,1})[ ]*$', $str, &$arr)) { return 0; } @@ -845,7 +845,7 @@ { // echo "Expression:$expression<br>"; $arr=""; - if (eregi('^((.)*)(\{((.)*)\})((.)*)$', $expression, &$arr)) + if (eregi('^((.)*)[ ]*(\{((.)*)\})[ ]*((.)*)$', $expression, &$arr)) { // for($i=0;$i<20;$i++) // { @@ -871,7 +871,7 @@ // Replace all <float> <sign> <float> <K|M|G> with 0 // echo "Expression:$expression<br>"; $arr=""; - if (eregi('^((.)*)([0-9\.]+[A-Z]{0,1})([\&\|\>\<\=\+\-\*\/\#]{1})([0-9\.]+[A-Z]{0,1})((.)*)$', $expression, &$arr)) + if (eregi('^((.)*)([0-9\.]+[A-Z]{0,1})[ ]*([\&\|\>\<\=\+\-\*\/\#]{1})[ ]*([0-9\.]+[A-Z]{0,1})((.)*)$', $expression, &$arr)) { // echo "OK<br>"; // for($i=0;$i<50;$i++) @@ -900,7 +900,7 @@ // Replace all (float) with 0 // echo "Expression2:[$expression]<br>"; $arr=""; - if (eregi('^((.)*)(\(([0-9\.]+)\))((.)*)$', $expression, &$arr)) + if (eregi('^((.)*)(\(([ 0-9\.]+)\))((.)*)$', $expression, &$arr)) { // echo "OK<br>"; // for($i=0;$i<30;$i++) |
