From 7b5a20334d72efaab192a484cfbeffc81faf97eb Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 6 Mar 2025 18:59:20 +0100 Subject: [PATCH] Don't allow inline edit of generated columns --- adminer/select.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index b74afc4a..7c58c9aa 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -436,7 +436,7 @@ if (!$columns && support("table")) { $val = select_value($val, $link, $field, $text_length); $id = h("val[$unique_idf][" . bracket_escape($key) . "]"); $value = $_POST["val"][$unique_idf][bracket_escape($key)]; - $editable = !is_array($row[$key]) && is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key]; + $editable = !is_array($row[$key]) && is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key] && !$field["generated"]; $text = preg_match('~text|lob~', $field["type"]); echo "…"); echo " data-text='" . ($long ? 2 : ($text ? 1 : 0)) . "'" . ($editable ? "" : " data-warning='" . h(lang('Use edit link to modify this value.')) . "'") - . ">$val" + . ">$val" ; } }