mirror of
https://github.com/vrana/adminer.git
synced 2025-09-08 21:30:42 +02:00
Cleanup the code for searching
This commit is contained in:
@@ -316,8 +316,8 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
}
|
||||
|
||||
function convertSearch($idf, $val, $field) {
|
||||
return (preg_match('~char|text|enum|set~', $field["type"]) && !preg_match("~^utf8~", $field["collation"]) && preg_match('~[\x80-\xFF]~', $val['val'])
|
||||
function convertSearch($idf, array $where, array $field) {
|
||||
return (preg_match('~char|text|enum|set~', $field["type"]) && !preg_match("~^utf8~", $field["collation"]) && preg_match('~[\x80-\xFF]~', $where['val'])
|
||||
? "CONVERT($idf USING " . charset($this->_conn) . ")"
|
||||
: $idf
|
||||
);
|
||||
|
@@ -212,9 +212,9 @@ if (isset($_GET["pgsql"])) {
|
||||
return $query;
|
||||
}
|
||||
|
||||
function convertSearch($idf, $val, $field) {
|
||||
function convertSearch($idf, array $where, array $field) {
|
||||
$textTypes = "char|text";
|
||||
if (strpos($val["op"], "LIKE") === false) {
|
||||
if (strpos($where["op"], "LIKE") === false) {
|
||||
$textTypes .= "|date|time(stamp)?|boolean|uuid|inet|cidr|macaddr|" . number_type();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user