Add id="" to cells with failed inline edit (bug #708)

This commit is contained in:
Jakub Vrana 2019-11-11 12:23:41 +01:00
parent 08c132cbea
commit c24dd79c22
2 changed files with 4 additions and 2 deletions

View file

@ -436,12 +436,13 @@ if (!$columns && support("table")) {
$value = $_POST["val"][$unique_idf][bracket_escape($key)];
$editable = !is_array($row[$key]) && is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key];
$text = preg_match('~text|lob~', $field["type"]);
echo "<td id='$id'";
if (($_GET["modify"] && $editable) || $value !== null) {
$h_value = h($value !== null ? $value : $row[$key]);
echo "<td>" . ($text ? "<textarea name='$id' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>$h_value</textarea>" : "<input name='$id' value='$h_value' size='$lengths[$key]'>");
echo ">" . ($text ? "<textarea name='$id' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>$h_value</textarea>" : "<input name='$id' value='$h_value' size='$lengths[$key]'>");
} else {
$long = strpos($val, "<i>…</i>");
echo "<td id='$id' data-text='" . ($long ? 2 : ($text ? 1 : 0)) . "'"
echo " data-text='" . ($long ? 2 : ($text ? 1 : 0)) . "'"
. ($editable ? "" : " data-warning='" . h(lang('Use edit link to modify this value.')) . "'")
. ">$val</td>"
;

View file

@ -1,4 +1,5 @@
Adminer 4.7.5-dev:
Add id="" to cells with failed inline edit (bug #708)
PostgreSQL, Oracle: Set schema for EXPLAIN queries in SQL command (bug #706)
Adminer 4.7.4 (released 2019-10-22):