1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-16 11:34:10 +02:00

Editor: Do not check boolean checkboxes with false in PostgreSQL (bug #607)

This commit is contained in:
Jakub Vrana
2018-05-06 11:26:43 +02:00
parent 60d1b7b3b4
commit 5c3fb875e1
2 changed files with 2 additions and 1 deletions

View File

@@ -485,7 +485,7 @@ qsl('div').onclick = whisperClick;", "")
);
}
if (like_bool($field)) {
return '<input type="checkbox" value="' . h($value ? $value : 1) . '"' . ($value ? ' checked' : '') . "$attrs>";
return '<input type="checkbox" value="' . h($value ? $value : 1) . '"' . (preg_match('~^(1|t|true|y|yes|on)$~i', $value) ? ' checked' : '') . "$attrs>";
}
$hint = "";
if (preg_match('~time~', $field["type"])) {