Skip date columns for non-date values in search anywhere (thanks to PR #408)
This commit is contained in:
parent
28209301ca
commit
2dd3bd0e1a
|
@ -563,6 +563,7 @@ class Adminer {
|
|||
foreach ($fields as $name => $field) {
|
||||
if ((preg_match('~^[-\d.' . (preg_match('~IN$~', $val["op"]) ? ',' : '') . ']+$~', $val["val"]) || !preg_match('~' . number_type() . '|bit~', $field["type"]))
|
||||
&& (!preg_match("~[\x80-\xFF]~", $val["val"]) || preg_match('~char|text|enum|set~', $field["type"]))
|
||||
&& (!preg_match('~date|timestamp~', $field["type"]) || preg_match('~^\d+-\d+-\d+~', $val["val"]))
|
||||
) {
|
||||
$cols[] = $prefix . $driver->convertSearch(idf_escape($name), $val, $field) . $cond;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Adminer 4.7.10-dev:
|
||||
Skip date columns for non-date values in search anywhere
|
||||
Add DB version to comment in export
|
||||
Support PHP 8 in create table (regression from 4.7.9)
|
||||
|
||||
|
|
Loading…
Reference in a new issue