Skip to content

Commit

Permalink
Add id="" to cells with failed inline edit (bug #708)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed Nov 11, 2019
1 parent 08c132c commit c24dd79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions adminer/select.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,13 @@
$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>"
;
Expand Down
1 change: 1 addition & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -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):
Expand Down

0 comments on commit c24dd79

Please sign in to comment.