Added support for ILIKE in pgsql.
This commit is contained in:
parent
060c006875
commit
411d198d0d
|
@ -649,7 +649,7 @@ AND typelem = 0"
|
||||||
$structured_types[$key] = array_keys($val);
|
$structured_types[$key] = array_keys($val);
|
||||||
}
|
}
|
||||||
$unsigned = array();
|
$unsigned = array();
|
||||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"); // no "SQL" to avoid SQL injection
|
$operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "ILIKE", "ILIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"); // no "SQL" to avoid SQL injection
|
||||||
$functions = array("char_length", "lower", "round", "to_hex", "to_timestamp", "upper");
|
$functions = array("char_length", "lower", "round", "to_hex", "to_timestamp", "upper");
|
||||||
$grouping = array("avg", "count", "count distinct", "max", "min", "sum");
|
$grouping = array("avg", "count", "count distinct", "max", "min", "sum");
|
||||||
$edit_functions = array(
|
$edit_functions = array(
|
||||||
|
|
|
@ -429,6 +429,8 @@ username.form['auth[driver]'].onchange();
|
||||||
$cond = " $val[val]"; // SQL injection
|
$cond = " $val[val]"; // SQL injection
|
||||||
} elseif ($val["op"] == "LIKE %%") {
|
} elseif ($val["op"] == "LIKE %%") {
|
||||||
$cond = " LIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%");
|
$cond = " LIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%");
|
||||||
|
} elseif ($val["op"] == "ILIKE %%") {
|
||||||
|
$cond = " ILIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%");
|
||||||
} elseif (!preg_match('~NULL$~', $val["op"])) {
|
} elseif (!preg_match('~NULL$~', $val["op"])) {
|
||||||
$cond .= " " . $this->processInput($fields[$val["col"]], $val["val"]);
|
$cond .= " " . $this->processInput($fields[$val["col"]], $val["val"]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue