|
3 | 3 | /** |
4 | 4 | * |
5 | 5 | * @version $Id$ |
| 6 | + * @package phpMyAdmin |
6 | 7 | */ |
7 | 8 |
|
8 | 9 | /** |
|
67 | 68 | } |
68 | 69 | } // end if |
69 | 70 | } // end for |
70 | | - |
| 71 | + |
71 | 72 | // Builds the field creation statement and alters the table |
72 | 73 | for ($i = 0; $i < $field_cnt; ++$i) { |
73 | 74 | // '0' is also empty for php :-( |
|
76 | 77 | } |
77 | 78 |
|
78 | 79 | $definition = ' ADD ' . PMA_Table::generateFieldSpec( |
79 | | - $_REQUEST['field_name'][$i], |
| 80 | + $_REQUEST['field_name'][$i], |
80 | 81 | $_REQUEST['field_type'][$i], |
81 | | - $_REQUEST['field_length'][$i], |
| 82 | + $_REQUEST['field_length'][$i], |
82 | 83 | $_REQUEST['field_attribute'][$i], |
83 | | - isset($_REQUEST['field_collation'][$i]) |
84 | | - ? $_REQUEST['field_collation'][$i] |
| 84 | + isset($_REQUEST['field_collation'][$i]) |
| 85 | + ? $_REQUEST['field_collation'][$i] |
85 | 86 | : '', |
86 | | - isset($_REQUEST['field_null'][$i]) |
87 | | - ? $_REQUEST['field_null'][$i] |
| 87 | + isset($_REQUEST['field_null'][$i]) |
| 88 | + ? $_REQUEST['field_null'][$i] |
88 | 89 | : 'NOT NULL', |
89 | | - $_REQUEST['field_default_type'][$i], |
| 90 | + $_REQUEST['field_default_type'][$i], |
90 | 91 | $_REQUEST['field_default_value'][$i], |
91 | 92 | isset($_REQUEST['field_extra'][$i]) |
92 | 93 | ? $_REQUEST['field_extra'][$i] |
93 | 94 | : false, |
94 | | - isset($_REQUEST['field_comments'][$i]) |
95 | | - ? $_REQUEST['field_comments'][$i] |
| 95 | + isset($_REQUEST['field_comments'][$i]) |
| 96 | + ? $_REQUEST['field_comments'][$i] |
96 | 97 | : '', |
97 | 98 | $field_primary, |
98 | 99 | $i |
|
121 | 122 | } |
122 | 123 | $definitions[] = ' ADD PRIMARY KEY (' . implode(', ', $fields) . ') '; |
123 | 124 | } |
124 | | - |
| 125 | + |
125 | 126 | // Builds the indexes statements and updates the table |
126 | 127 | if (count($field_index)) { |
127 | 128 | $fields = array(); |
|
130 | 131 | } |
131 | 132 | $definitions[] = ' ADD INDEX (' . implode(', ', $fields) . ') '; |
132 | 133 | } |
133 | | - |
| 134 | + |
134 | 135 | // Builds the uniques statements and updates the table |
135 | 136 | if (count($field_unique)) { |
136 | 137 | $fields = array(); |
|
167 | 168 | foreach ($_REQUEST['field_mimetype'] as $fieldindex => $mimetype) { |
168 | 169 | if (isset($_REQUEST['field_name'][$fieldindex]) |
169 | 170 | && strlen($_REQUEST['field_name'][$fieldindex])) { |
170 | | - PMA_setMIME($db, $table, |
171 | | - $_REQUEST['field_name'][$fieldindex], |
172 | | - $mimetype, |
173 | | - $_REQUEST['field_transformation'][$fieldindex], |
| 171 | + PMA_setMIME($db, $table, |
| 172 | + $_REQUEST['field_name'][$fieldindex], |
| 173 | + $mimetype, |
| 174 | + $_REQUEST['field_transformation'][$fieldindex], |
174 | 175 | $_REQUEST['field_transformation_options'][$fieldindex]); |
175 | 176 | } |
176 | 177 | } |
|
0 commit comments