1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-09 08:06:59 +02:00

Offer original values in multi-row editing (regression from 4.16.0)

This commit is contained in:
Jakub Vrana
2025-02-23 13:28:21 +01:00
parent 9d992e4be6
commit 08a956cf2a
2 changed files with 6 additions and 1 deletions

View 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>';

View 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