From: Jakub Vrana Date: Thu, 6 Mar 2025 17:59:20 +0000 (+0100) Subject: Don't allow inline edit of generated columns X-Git-Tag: v5.0.0~13 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=7b5a20334d72efaab192a484cfbeffc81faf97eb;p=adminer.git Don't allow inline edit of generated columns --- 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" ; } }