]> git.joonet.de Git - adminer.git/commitdiff
Select: Align numeric null right
authorJakub Vrana <jakub@vrana.cz>
Mon, 31 Mar 2025 15:14:02 +0000 (17:14 +0200)
committerJakub Vrana <jakub@vrana.cz>
Mon, 31 Mar 2025 15:14:02 +0000 (17:14 +0200)
adminer/select.inc.php

index 38912b7206aafa75624ab82aba154d6776d94c6e..0fbe7ba47c06763c792124bd6da738ed9ca6b64c 100644 (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]'>");