mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 16:17:48 +02:00
Select: Align numeric null right
This commit is contained in:
@@ -456,7 +456,7 @@ if (!$columns && support("table")) {
|
|||||||
$value = idx(idx($_POST["val"], $unique_idf), bracket_escape($key));
|
$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"];
|
$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"]) && 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) {
|
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