1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 17:14:07 +02:00

Trim identifiers (bug #3405309)

This commit is contained in:
Jakub Vrana
2011-09-10 13:06:59 +02:00
parent bed3856f2d
commit ef867e6bd1
9 changed files with 26 additions and 20 deletions

View File

@@ -178,7 +178,7 @@ function process_type($field, $collate = "COLLATE") {
*/
function process_field($field, $type_field) {
return array(
idf_escape($field["field"]),
idf_escape(trim($field["field"])),
process_type($type_field),
($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp
(isset($field["default"]) ? " DEFAULT " . (($field["type"] == "timestamp" && eregi('^CURRENT_TIMESTAMP$', $field["default"])) || ($field["type"] == "bit" && ereg("^([0-9]+|b'[0-1]+')\$", $field["default"])) ? $field["default"] : q($field["default"])) : ""),