]> git.joonet.de Git - adminer.git/commitdiff
Offer original values in multi-row editing (regression from 4.16.0)
authorJakub Vrana <jakub@vrana.cz>
Sun, 23 Feb 2025 12:28:21 +0000 (13:28 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sun, 23 Feb 2025 12:28:21 +0000 (13:28 +0100)
adminer/include/functions.inc.php
changes.txt

index 196f70be67501ce726c7fa55952c2d33992104c5..5fae055378f7b4e4e9bcf3b4191906ef56576c69 100644 (file)
@@ -202,7 +202,11 @@ function optionlist($options, $selected = null, $use_keys = false) {
                        $opts = $v;
                }
                foreach ($opts as $key => $val) {
-                       $return .= '<option' . ($use_keys || is_string($key) ? ' value="' . h($key) . '"' : '') . (($use_keys || is_string($key) ? (string) $key : $val) === (string) $selected ? ' selected' : '') . '>' . h($val);
+                       $return .= '<option'
+                               . ($use_keys || is_string($key) ? ' value="' . h($key) . '"' : '')
+                               . ($selected !== null && ($use_keys || is_string($key) ? (string) $key : $val) === $selected ? ' selected' : '')
+                               . '>' . h($val)
+                       ;
                }
                if (is_array($v)) {
                        $return .= '</optgroup>';
index a4f76d67166e08c40eae90388f6f7262f9a7b6e9..0e4e0564db156f0c084451ba3db2038fbb31982c 100644 (file)
@@ -1,5 +1,6 @@
 Adminer 4.17.0-dev:
 Hide index column options by default
+Offer original values in multi-row editing (regression from 4.16.0)
 MySQL, PostgreSQL, MS SQL: Support CHECK constraint
 MySQL: Don't offer empty enum value in edit
 PostgreSQL: Link user defined types