]> git.joonet.de Git - adminer.git/commitdiff
Added support for ILIKE in pgsql.
authorbeerwine <martinmecera@centrum.cz>
Mon, 19 Jan 2015 08:38:10 +0000 (09:38 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sat, 7 Feb 2015 18:25:33 +0000 (10:25 -0800)
adminer/drivers/pgsql.inc.php
adminer/include/adminer.inc.php

index 7e0d629ab3510ecf20a50c4f763c7f7e113a5cef..f8c51be832ba020e10b71e53a1fb3a10223b4289 100644 (file)
@@ -649,7 +649,7 @@ AND typelem = 0"
                $structured_types[$key] = array_keys($val);
        }
        $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");
        $grouping = array("avg", "count", "count distinct", "max", "min", "sum");
        $edit_functions = array(
index fb4bbd725af55fcdc6ffe11436a53bbff5494934..4ef6ab449aab725933c01f0abade5165efb7e663 100644 (file)
@@ -429,6 +429,8 @@ username.form['auth[driver]'].onchange();
                                        $cond = " $val[val]"; // SQL injection
                                } elseif ($val["op"] == "LIKE %%") {
                                        $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"])) {
                                        $cond .= " " . $this->processInput($fields[$val["col"]], $val["val"]);
                                }