Merge pull request #871 from f0o/issue-870

Pre-Formatting rules to make parsing easier.
This commit is contained in:
Neil Lathwood 2015-04-28 15:23:41 +01:00
commit ce8193d541

View File

@ -35,6 +35,9 @@ function GenSQL($rule) {
if( empty($rule) ) {
return false;
}
//Pretty-print rule to dissect easier
$pretty = array('*' => ' * ', '(' => ' ( ', ')' => ' ) ', '/' => ' / ', '&&' => ' && ', '||' => ' || ');
$rule = str_replace(array_keys($pretty),$pretty,$rule);
$tmp = explode(" ",$rule);
$tables = array();
foreach( $tmp as $opt ) {