1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 23:57:29 +02:00

Select: Align numeric null right

This commit is contained in:
Jakub Vrana
2025-03-31 17:14:02 +02:00
parent eb6b23e014
commit 5cfd3f422c

View File

@@ -456,7 +456,7 @@ if (!$columns && support("table")) {
$value = idx(idx($_POST["val"], $unique_idf), bracket_escape($key));
$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"]);
echo "<td id='$id'" . (preg_match(number_type(), $field["type"]) && is_numeric(strip_tags($val)) ? " class='number'" : "");
echo "<td id='$id'" . (preg_match(number_type(), $field["type"]) && ($val == '<i>NULL</i>' || is_numeric(strip_tags($val))) ? " class='number'" : "");
if (($_GET["modify"] && $editable) || $value !== null) {
$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]'>");