mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 23:57:29 +02:00
Do not align right non-numbers, e.g. NULL or foreign keys
This commit is contained in:
@@ -453,7 +453,7 @@ if (!$columns && support("table")) {
|
|||||||
$value = $_POST["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] && !$field["generated"];
|
$editable = !is_array($row[$key]) && is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key] && !$field["generated"];
|
||||||
$text = preg_match('~text|json|lob~', $field["type"]);
|
$text = preg_match('~text|json|lob~', $field["type"]);
|
||||||
echo "<td id='$id'" . (preg_match(number_type(), $field["type"]) ? " class='number'" : "");
|
echo "<td id='$id'" . (preg_match(number_type(), $field["type"]) && is_numeric(strip_tags($val)) ? " class='number'" : "");
|
||||||
if (($_GET["modify"] && $editable) || $value !== null) {
|
if (($_GET["modify"] && $editable) || $value !== null) {
|
||||||
$h_value = h($value !== null ? $value : $row[$key]);
|
$h_value = h($value !== null ? $value : $row[$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]'>");
|
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]'>");
|
||||||
|
Reference in New Issue
Block a user