Allow full length in limited int (thanks to Vlasta Neubauer)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@598 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
d2b1037121
commit
bbacf889dc
|
@ -1,6 +1,7 @@
|
||||||
phpMinAdmin 1.10.1:
|
phpMinAdmin 1.10.1:
|
||||||
Highlight odd and hover rows
|
Highlight odd and hover rows
|
||||||
Partition editing comfort (bug #2783446)
|
Partition editing comfort (bug #2783446)
|
||||||
|
Allow full length in limited int (thanks to Vlasta Neubauer)
|
||||||
|
|
||||||
phpMinAdmin 1.10.0:
|
phpMinAdmin 1.10.0:
|
||||||
Partitioning (MySQL 5.1)
|
Partitioning (MySQL 5.1)
|
||||||
|
|
|
@ -48,7 +48,8 @@ function input($name, $field, $value) {
|
||||||
} elseif (preg_match('~binary|blob~', $field["type"])) {
|
} elseif (preg_match('~binary|blob~', $field["type"])) {
|
||||||
echo (ini_get("file_uploads") ? '<input type="file" name="' . $name . '"' . $onchange . ' />' : lang('File uploads are disabled.') . ' ');
|
echo (ini_get("file_uploads") ? '<input type="file" name="' . $name . '"' . $onchange . ' />' : lang('File uploads are disabled.') . ' ');
|
||||||
} else {
|
} 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 . ' />';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ function dump_csv($row) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function dump_table($table, $style, $is_view = false) {
|
function dump_table($table, $style, $is_view = false) {
|
||||||
global $mysql, $types;
|
global $mysql;
|
||||||
if ($_POST["format"] == "csv") {
|
if ($_POST["format"] == "csv") {
|
||||||
echo "\xef\xbb\xbf";
|
echo "\xef\xbb\xbf";
|
||||||
if ($style) {
|
if ($style) {
|
||||||
|
|
Loading…
Reference in a new issue