Merge pull request #3138 from f0o/minor-alerting-addons

Minor alerting addons
This commit is contained in:
Neil Lathwood
2016-03-08 21:00:37 +00:00
3 changed files with 29 additions and 11 deletions

View File

@@ -37,7 +37,7 @@ function GenSQL($rule) {
return false;
}
//Pretty-print rule to dissect easier
$pretty = array('*' => ' * ', '(' => ' ( ', ')' => ' ) ', '/' => ' / ', '&&' => ' && ', '||' => ' || ', 'DATE_SUB ( NOW ( )' => 'DATE_SUB( NOW()');
$pretty = array('*' => '*', '(' => ' ( ', ')' => ' ) ', '/' => '/', '&&' => ' && ', '||' => ' || ', 'DATE_SUB ( NOW ( )' => 'DATE_SUB( NOW()');
$rule = str_replace(array_keys($pretty),$pretty,$rule);
$tmp = explode(" ",$rule);
$tables = array();