Allow , in length
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@213 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
49c3007eea
commit
b0b9042bfa
|
@ -71,7 +71,7 @@ function edit_type($key, $field, $collations) {
|
||||||
function process_type($field, $collate = "COLLATE") {
|
function process_type($field, $collate = "COLLATE") {
|
||||||
global $mysql, $enum_length, $unsigned;
|
global $mysql, $enum_length, $unsigned;
|
||||||
return " $field[type]"
|
return " $field[type]"
|
||||||
. ($field["length"] ? "(" . (preg_match("~^\\s*(?:$enum_length)(?:\\s*,\\s*(?:$enum_length))*\\s*\$~", $field["length"]) && preg_match_all("~$enum_length~", $field["length"], $matches) ? implode(",", $matches[0]) : intval($field["length"])) . ")" : "")
|
. ($field["length"] ? "(" . (preg_match("~^\\s*(?:$enum_length)(?:\\s*,\\s*(?:$enum_length))*\\s*\$~", $field["length"]) && preg_match_all("~$enum_length~", $field["length"], $matches) ? implode(",", $matches[0]) : preg_replace('~[^0-9,]~', '', $field["length"])) . ")" : "")
|
||||||
. (preg_match('~int|float|double|decimal~', $field["type"]) && in_array($field["unsigned"], $unsigned) ? " $field[unsigned]" : "")
|
. (preg_match('~int|float|double|decimal~', $field["type"]) && in_array($field["unsigned"], $unsigned) ? " $field[unsigned]" : "")
|
||||||
. (preg_match('~char|text|enum|set~', $field["type"]) && $field["collation"] ? " $collate '" . $mysql->escape_string($field["collation"]) . "'" : "")
|
. (preg_match('~char|text|enum|set~', $field["type"]) && $field["collation"] ? " $collate '" . $mysql->escape_string($field["collation"]) . "'" : "")
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue