mirror of
https://github.com/vrana/adminer.git
synced 2026-03-24 21:40:03 +01:00
Editor: Display tinyint(1) as checkbox (fix #1246, regression from 5.4.2)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
- Foreign key: Display new field in case of an error
|
||||
- PostgreSQL: Order NULL last
|
||||
- PostgreSQL: Display all SQL command warnings and only once
|
||||
- Editor: Display tinyint(1) as checkbox (bug #1246, regression from 5.4.2)
|
||||
- Croatian translation
|
||||
|
||||
## Adminer 5.4.2 (released 2026-02-08)
|
||||
|
||||
@@ -43,8 +43,8 @@ function send_mail(string $email, string $subject, string $message, string $from
|
||||
}
|
||||
|
||||
/** Check whether the column looks like boolean
|
||||
* @param array{type: string} $field single field returned from fields()
|
||||
* @param array{type: string, length?: string} $field single field returned from fields()
|
||||
*/
|
||||
function like_bool(array $field): bool {
|
||||
return preg_match("~bool|bit~", $field["type"]);
|
||||
return $field["type"] == "bool" || (preg_match('~bit|tinyint~', $field["type"]) && $field["length"] == 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user