Permalink
Browse files

Enlarge fields for long strings

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1171 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent dd10121 commit ad237d307121233227a8ead7a18609ba46401a9a jakubvrana committed Oct 6, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 adminer/include/functions.inc.php
@@ -436,7 +436,7 @@ function input($field, $value, $function) {
} else {
// int(3) is only a display hint
$maxlength = (!ereg('int', $field["type"]) && preg_match('~^([0-9]+)(,([0-9]+))?$~', $field["length"], $match) ? ($match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
- echo "<input name='fields[$name]' value='" . h($value) . "'" . ($maxlength ? " maxlength='$maxlength'" : "") . "$onchange>";
+ echo "<input name='fields[$name]' value='" . h($value) . "'" . ($maxlength ? " maxlength='$maxlength'" : "") . (ereg('char', $field["type"]) && $field["length"] > 20 ? " size='40'" : "") . "$onchange>";
}
}
}

0 comments on commit ad237d3

Please sign in to comment.