diff --git a/adminer/include/html.inc.php b/adminer/include/html.inc.php index e9d51bff..6e633ab7 100644 --- a/adminer/include/html.inc.php +++ b/adminer/include/html.inc.php @@ -396,6 +396,7 @@ function edit_form(string $table, array $fields, $row, ?bool $update, string $er return; } echo "
\n"; + $editable = false; if (!$fields) { echo "

" . lang('You have no privileges to update this table.') . "\n"; } else { @@ -429,6 +430,7 @@ function edit_form(string $table, array $fields, $row, ?bool $update, string $er if (($update && !isset($field["privileges"]["update"])) || $field["generated"]) { echo "" . select_value($value, '', $field, null); } else { + $editable = true; $function = ($_POST["save"] ? idx($_POST["function"], $name, "") : ($update && preg_match('~^CURRENT_TIMESTAMP~i', $field["on_update"]) @@ -469,7 +471,7 @@ function edit_form(string $table, array $fields, $row, ?bool $update, string $er echo "\n"; } echo "

\n"; - if ($fields) { + if ($editable) { echo "\n"; if (!isset($_GET["select"])) { echo "