diff options
| author | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-01-28 10:37:46 +0000 |
|---|---|---|
| committer | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-01-28 10:37:46 +0000 |
| commit | 28a45c82804542055ec4a44ca9f8fe79a6b7c2d5 (patch) | |
| tree | af55ef40fb0e277888c0bfb943560ac09b780c64 /frontends/php/include | |
| parent | 1ce286df20a76fd856ec1aa136a9fdc9cd60c231 (diff) | |
- fix for adding trigger expressions having sign '-' (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@3766 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/triggers.inc.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/frontends/php/include/triggers.inc.php b/frontends/php/include/triggers.inc.php index 6a60d4eb..7b605bf8 100644 --- a/frontends/php/include/triggers.inc.php +++ b/frontends/php/include/triggers.inc.php @@ -206,7 +206,8 @@ // 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)) +// The minus sing '-' must be the last one in the list, otherwise it won't work! + 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++) |
