]> git.joonet.de Git - adminer.git/commitdiff
Allow full length in limited int (thanks to Vlasta Neubauer)
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Thu, 7 May 2009 19:59:57 +0000 (19:59 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Thu, 7 May 2009 19:59:57 +0000 (19:59 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@598 7c3ca157-0c34-0410-bff1-cbf682f78f5c

changes.txt
editing.inc.php
export.inc.php

index 1c4b9a26da96d1894e431130b3bad15949671881..332969fa03c5968816e2e609ada0c8979342accc 100644 (file)
@@ -1,6 +1,7 @@
 phpMinAdmin 1.10.1:
 Highlight odd and hover rows
 Partition editing comfort (bug #2783446)
+Allow full length in limited int (thanks to Vlasta Neubauer)
 
 phpMinAdmin 1.10.0:
 Partitioning (MySQL 5.1)
index 16833b691f98b401f56f501d5869e155fabd0a6c..facbe5c3e49b9162df12fefe72e005c2b7f069b9 100644 (file)
@@ -48,7 +48,8 @@ function input($name, $field, $value) {
                } elseif (preg_match('~binary|blob~', $field["type"])) {
                        echo (ini_get("file_uploads") ? '<input type="file" name="' . $name . '"' . $onchange . ' />' : lang('File uploads are disabled.') . ' ');
                } else {
-                       echo '<input name="fields[' . $name . ']" value="' . htmlspecialchars($value) . '"' . (preg_match('~^([0-9]+)(,([0-9]+))?$~', $field["length"], $match) ? " maxlength='" . ($match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) . "'" : ($types[$field["type"]] ? " maxlength='" . $types[$field["type"]] . "'" : '')) . $onchange . ' />';
+                       $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="' . htmlspecialchars($value) . '"' . ($maxlength ? " maxlength='$maxlength'" : "") . $onchange . ' />';
                }
        }
 }
index 25c0d6aaabe68398aa0899cad74a0b1f0f45e69b..bfb039c98c151a0bfc930bc3fc788d4e57eb6365 100644 (file)
@@ -9,7 +9,7 @@ function dump_csv($row) {
 }
 
 function dump_table($table, $style, $is_view = false) {
-       global $mysql, $types;
+       global $mysql;
        if ($_POST["format"] == "csv") {
                echo "\xef\xbb\xbf";
                if ($style) {