diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 2bf679b6..e0ded6ba 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -915,7 +915,7 @@ function input($field, $value, $function) { echo $input; } elseif (preg_match('~bool~', $field["type"])) { echo "" . - ""; + ""; } elseif ($field["type"] == "set") { //! 64 bits preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches); foreach ($matches[1] as $i => $val) { diff --git a/changes.txt b/changes.txt index 59b1319f..fdbcf68c 100644 --- a/changes.txt +++ b/changes.txt @@ -11,6 +11,7 @@ PostgreSQL: Export DROP SEQUENCE if dropping table MS SQL: Support freetds Elasticsearch: Insert, update, delete MongoDB: Support mongodb PHP extension +Editor: Fix displaying of false values in PostgreSQL (bug #568) Adminer 4.4.0 (released 2018-01-17): Add Content Security Policy diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 81907bca..16d90ec8 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -183,7 +183,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5 } } if (like_bool($field) && $return != " ") { // bool - $return = ($val ? lang('yes') : lang('no')); + $return = (preg_match('~^(1|t|true|y|yes|on)$~i', $value) ? lang('yes') : lang('no')); } if ($link) { $return = "$return";