]> git.joonet.de Git - adminer.git/commitdiff
Enlarge fields for long strings
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 6 Oct 2009 11:38:07 +0000 (11:38 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 6 Oct 2009 11:38:07 +0000 (11:38 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1171 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/include/functions.inc.php

index b6f090407477e3f86b10aa253d0d720b78fd343f..2556f61e261f64275e62f5d2f0a0bb6a70365c75 100644 (file)
@@ -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>";
                }
        }
 }