1 |
vip-ire |
1.1 |
--- zabbix-1.6.6/frontends/php/include/triggers.inc.php.ZBX-1027 2009-08-26 15:16:26.000000000 +0200 |
2 |
|
|
+++ zabbix-1.6.6/frontends/php/include/triggers.inc.php 2009-09-29 19:39:26.000000000 +0200 |
3 |
|
|
@@ -622,10 +622,12 @@ |
4 |
|
|
/* Replace all {server:key.function(param)} and {MACRO} with '$ZBX_TR_EXPR_REPLACE_TO' */ |
5 |
|
|
while(ereg(ZBX_EREG_EXPRESSION_TOKEN_FORMAT, $expr, $arr)){ |
6 |
|
|
|
7 |
|
|
- if($arr[ZBX_EXPRESSION_MACRO_ID] && !isset($ZBX_TR_EXPR_ALLOWED_MACROS[$arr[ZBX_EXPRESSION_MACRO_ID]]) ){ |
8 |
|
|
- error('Unknown macro ['.$arr[ZBX_EXPRESSION_MACRO_ID].']'); |
9 |
|
|
- return false; |
10 |
|
|
- } |
11 |
|
|
+ if($arr[ZBX_EXPRESSION_MACRO_ID]) { |
12 |
|
|
+ if (!isset($ZBX_TR_EXPR_ALLOWED_MACROS[$arr[ZBX_EXPRESSION_MACRO_ID]]) ){ |
13 |
|
|
+ error('Unknown macro ['.$arr[ZBX_EXPRESSION_MACRO_ID].']'); |
14 |
|
|
+ return false; |
15 |
|
|
+ } |
16 |
|
|
+ } |
17 |
|
|
else if( !$arr[ZBX_EXPRESSION_MACRO_ID] ) { |
18 |
|
|
$host = &$arr[ZBX_EXPRESSION_SIMPLE_EXPRESSION_ID + ZBX_SIMPLE_EXPRESSION_HOST_ID]; |
19 |
|
|
$key = &$arr[ZBX_EXPRESSION_SIMPLE_EXPRESSION_ID + ZBX_SIMPLE_EXPRESSION_KEY_ID]; |