]> git.joonet.de Git - adminer.git/commitdiff
Save bytes
authorJakub Vrana <jakub@vrana.cz>
Fri, 9 Aug 2013 02:36:15 +0000 (19:36 -0700)
committerJakub Vrana <jakub@vrana.cz>
Fri, 9 Aug 2013 02:36:15 +0000 (19:36 -0700)
adminer/include/editing.inc.php

index da1cb5be044b4f96949796ae76e4dba589abaf42..42389be4f7d80f960835d10631eb65fb298b07c3 100644 (file)
@@ -144,7 +144,10 @@ function edit_type($key, $field, $collations, $foreign_keys = array()) {
 if ($type && !isset($types[$type]) && !isset($foreign_keys[$type])) {
        array_unshift($structured_types, $type);
 }
-echo optionlist($structured_types + ($foreign_keys ? array(lang('Foreign keys') => $foreign_keys) : array()), $type);
+if ($foreign_keys) {
+       $structured_types[lang('Foreign keys')] = $foreign_keys;
+}
+echo optionlist($structured_types, $type);
 ?></select>
 <td><input name="<?php echo $key; ?>[length]" value="<?php echo h($field["length"]); ?>" size="3" onfocus="editingLengthFocus(this);"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); ?> onchange="editingLengthChange(this);" onkeyup="this.onchange();"><td class="options"><?php //! type="number" with enabled JavaScript
        echo "<select name='$key" . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>';