Permalink
Browse files

alerts: Remove prettifying of mysql query in alerts (#6614)

* Pretty mysql for alerts breaks regex rules

Fix for issue #6613

* Remove useless replacements
  • Loading branch information...
XioNoX authored and laf committed May 13, 2017
1 parent 595e75b commit 073b444d4a0f54211bd7ffef36b28b1540dc4194
Showing with 1 addition and 1 deletion.
  1. +1 −1 includes/alerts.inc.php
View
@@ -36,7 +36,7 @@ function GenSQL($rule)
return false;
}
//Pretty-print rule to dissect easier
$pretty = array('*' => '*', '(' => ' ( ', ')' => ' ) ', '/' => '/', '&&' => ' && ', '||' => ' || ', 'DATE_SUB ( NOW ( )' => 'DATE_SUB( NOW()');
$pretty = array('&&' => ' && ', '||' => ' || ');
$rule = str_replace(array_keys($pretty), $pretty, $rule);
$tmp = explode(" ", $rule);
$tables = array();

0 comments on commit 073b444

Please sign in to comment.