@@ -139,7 +139,7 @@ |
||
139 | 139 | } |
140 | 140 | } |
141 | 141 | if (\preg_match("~ IDENTIFIED BY PASSWORD '([^']+)~", $row[0], $match)) { |
142 | - $password = $match[1]; |
|
142 | + $password = $match[1]; |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | $this->viewAdmin = new ViewAdmin(); |
53 | 53 | $this->viewAdmin->init($this->admin()); |
54 | 54 | } |
55 | - return $this->viewAdmin ; |
|
55 | + return $this->viewAdmin; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -239,8 +239,7 @@ discard block |
||
239 | 239 | $row[$key] = '"' . \str_replace('"', '""', $val) . '"'; |
240 | 240 | } |
241 | 241 | } |
242 | - $separator = $this->options['format'] == 'csv' ? ',' : |
|
243 | - ($this->options['format'] == 'tsv' ? "\t" : ';'); |
|
242 | + $separator = $this->options['format'] == 'csv' ? ',' : ($this->options['format'] == 'tsv' ? "\t" : ';'); |
|
244 | 243 | $this->queries[] = \implode($separator, $row); |
245 | 244 | } |
246 | 245 | |
@@ -354,7 +353,7 @@ discard block |
||
354 | 353 | } else { |
355 | 354 | if (!$insert) { |
356 | 355 | $insert = 'INSERT INTO ' . $this->driver->table($table) . ' (' . |
357 | - \implode(', ', \array_map(function ($key) { |
|
356 | + \implode(', ', \array_map(function($key) { |
|
358 | 357 | return $this->driver->escapeId($key); |
359 | 358 | }, $keys)) . ') VALUES'; |
360 | 359 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | { |
24 | 24 | return [ |
25 | 25 | 'select' => $select, |
26 | - 'values' => (array)$options["columns"], |
|
26 | + 'values' => (array) $options["columns"], |
|
27 | 27 | 'columns' => $columns, |
28 | 28 | 'functions' => $this->driver->functions(), |
29 | 29 | 'grouping' => $this->driver->grouping(), |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | } |
48 | 48 | return [ |
49 | 49 | // 'where' => $where, |
50 | - 'values' => (array)$options["where"], |
|
50 | + 'values' => (array) $options["where"], |
|
51 | 51 | 'columns' => $columns, |
52 | 52 | 'indexes' => $indexes, |
53 | 53 | 'operators' => $this->driver->operators(), |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | private function getSortingOptions(array $columns, array $options) |
67 | 67 | { |
68 | 68 | $values = []; |
69 | - $descs = (array)$options["desc"]; |
|
70 | - foreach ((array)$options["order"] as $key => $value) { |
|
69 | + $descs = (array) $options["desc"]; |
|
70 | + foreach ((array) $options["order"] as $key => $value) { |
|
71 | 71 | $values[] = [ |
72 | 72 | 'col' => $value, |
73 | 73 | 'desc' => $descs[$key] ?? 0, |
@@ -299,14 +299,14 @@ discard block |
||
299 | 299 | $target .= '<b>' . $this->util->html($foreignKey->schema) . '</b>.'; |
300 | 300 | } |
301 | 301 | $target = $this->util->html($foreignKey->table) . |
302 | - '(' . \implode(', ', \array_map(function ($key) { |
|
302 | + '(' . \implode(', ', \array_map(function($key) { |
|
303 | 303 | return $this->util->html($key); |
304 | 304 | }, $foreignKey->target)) . ')'; |
305 | 305 | $details[] = [ |
306 | 306 | 'name' => $this->util->html($name), |
307 | 307 | 'source' => '<i>' . \implode( |
308 | 308 | '</i>, <i>', |
309 | - \array_map(function ($key) { |
|
309 | + \array_map(function($key) { |
|
310 | 310 | return $this->util->html($key); |
311 | 311 | }, $foreignKey->source) |
312 | 312 | ) . '</i>', |
@@ -486,8 +486,7 @@ discard block |
||
486 | 486 | { |
487 | 487 | $foreignKey = $this->foreignKeys[$field->type] ?? null; |
488 | 488 | //! Can collide with user defined type |
489 | - $typeField = ($foreignKey === null ? $field : |
|
490 | - TableFieldEntity::make($this->referencableTables[$foreignKey])); |
|
489 | + $typeField = ($foreignKey === null ? $field : TableFieldEntity::make($this->referencableTables[$foreignKey])); |
|
491 | 490 | $processedField = $this->util->processField($field, $typeField); |
492 | 491 | $origField = $this->fields[$this->fieldName] ?? null; |
493 | 492 | if ($this->fieldName === '') { |
@@ -569,7 +568,7 @@ discard block |
||
569 | 568 | private function makeTableAttrs(array $values, string $table = '') |
570 | 569 | { |
571 | 570 | // From create.inc.php |
572 | - $values['fields'] = (array)$values['fields']; |
|
571 | + $values['fields'] = (array) $values['fields']; |
|
573 | 572 | if ($values['autoIncrementCol']) { |
574 | 573 | $values['fields'][$values['autoIncrementCol']]['autoIncrement'] = true; |
575 | 574 | } |
@@ -7,29 +7,29 @@ discard block |
||
7 | 7 | <input type="text" name="name" class="form-control" value="<?php |
8 | 8 | echo $this->table->name ?>" placeholder="Name" /> |
9 | 9 | </div> |
10 | -<?php if($this->engines): ?> |
|
10 | +<?php if ($this->engines): ?> |
|
11 | 11 | <div class="col-md-2 adminer-edit-table-engine"> |
12 | 12 | <select name="engine" class="form-control"> |
13 | 13 | <option value="">(engine)</option> |
14 | -<?php foreach($this->engines as $group => $engine): ?> |
|
15 | - <option <?php if(!strcasecmp($this->table->engine, $engine)): ?>selected<?php |
|
14 | +<?php foreach ($this->engines as $group => $engine): ?> |
|
15 | + <option <?php if (!strcasecmp($this->table->engine, $engine)): ?>selected<?php |
|
16 | 16 | endif ?>><?php echo $engine ?></option> |
17 | 17 | <?php endforeach ?> |
18 | 18 | </select> |
19 | 19 | </div> |
20 | 20 | <?php endif ?> |
21 | -<?php if($this->collations): ?> |
|
21 | +<?php if ($this->collations): ?> |
|
22 | 22 | <div class="col-md-3 adminer-edit-table-collation"> |
23 | 23 | <select name="collation" class="form-control"> |
24 | 24 | <option value="" selected>(collation)</option> |
25 | -<?php foreach($this->collations as $group => $collations): ?> |
|
26 | -<?php if(is_string($collations)): ?> |
|
27 | - <option <?php if($this->table->collation === $collations): ?>selected<?php |
|
25 | +<?php foreach ($this->collations as $group => $collations): ?> |
|
26 | +<?php if (is_string($collations)): ?> |
|
27 | + <option <?php if ($this->table->collation === $collations): ?>selected<?php |
|
28 | 28 | endif ?>><?php echo $collations ?></option> |
29 | 29 | <?php else: ?> |
30 | 30 | <optgroup label="<?php echo $group ?>"> |
31 | -<?php foreach($collations as $collation): ?> |
|
32 | - <option <?php if($this->table->collation === $collation): ?>selected<?php |
|
31 | +<?php foreach ($collations as $collation): ?> |
|
32 | + <option <?php if ($this->table->collation === $collation): ?>selected<?php |
|
33 | 33 | endif ?>><?php echo $collation ?></option> |
34 | 34 | <?php endforeach ?> |
35 | 35 | </optgroup> |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | </select> |
39 | 39 | </div> |
40 | 40 | <?php endif ?> |
41 | -<?php if($this->support['comment']): ?> |
|
41 | +<?php if ($this->support['comment']): ?> |
|
42 | 42 | <div class="col-md-4 adminer-table-column-middle"> |
43 | 43 | <input name="comment" class="form-control" value="<?php |
44 | 44 | echo $this->table->comment ?>" placeholder="<?php |
@@ -50,18 +50,18 @@ discard block |
||
50 | 50 | <label class="col-md-3 adminer-table-column-left"><?php echo $this->trans->lang('Column') ?></label> |
51 | 51 | <label class="col-md-1 adminer-table-column-null-header" for="autoIncrementCol"> |
52 | 52 | <input type="radio" name="autoIncrementCol" value="0" <?php |
53 | - if(!$this->options['hasAutoIncrement']): ?>checked <?php endif ?>/>AI-P |
|
53 | + if (!$this->options['hasAutoIncrement']): ?>checked <?php endif ?>/>AI-P |
|
54 | 54 | </label> |
55 | 55 | <label class="col-md-7 adminer-table-column-middle"><?php echo $this->trans->lang('Options') ?></label> |
56 | 56 | <div class="col-md-1 adminer-table-column-buttons-header"> |
57 | -<?php if($this->support['columns']): ?> |
|
57 | +<?php if ($this->support['columns']): ?> |
|
58 | 58 | <button type="button" class="btn btn-primary btn-sm" id="adminer-table-column-add"> |
59 | 59 | <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> |
60 | 60 | </button> |
61 | 61 | <?php endif ?> |
62 | 62 | </div> |
63 | 63 | </div> |
64 | -<?php $index = 0; foreach($this->fields as $field): ?> |
|
64 | +<?php $index = 0; foreach ($this->fields as $field): ?> |
|
65 | 65 | <?php echo $this->render('adminer::views::table/column', [ |
66 | 66 | 'trans' => $this->trans, |
67 | 67 | 'class' => $this->formId . '-column', |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if(isset($this->class)): ?> |
|
1 | +<?php if (isset($this->class)): ?> |
|
2 | 2 | <div class="form-group row <?php echo $this->class ?>" data-index="<?php |
3 | 3 | echo $this->index ?>" id="<?php echo sprintf('%s-%02d', $this->class, $this->index) ?>"> |
4 | 4 | <?php endif ?> |
@@ -14,23 +14,23 @@ discard block |
||
14 | 14 | </div> |
15 | 15 | <label class="col-md-1 adminer-table-column-null" for="autoIncrementCol"> |
16 | 16 | <input type="radio" name="autoIncrementCol" value="<?php echo ($this->index + 1) ?>" <?php |
17 | - if($this->field->autoIncrement): ?>checked <?php endif ?>/> AI |
|
17 | + if ($this->field->autoIncrement): ?>checked <?php endif ?>/> AI |
|
18 | 18 | <input type="checkbox" name="<?php echo $this->prefixFields ?>[primary]" <?php |
19 | - if($this->field->primary): ?>checked <?php endif ?>/> |
|
19 | + if ($this->field->primary): ?>checked <?php endif ?>/> |
|
20 | 20 | </label> |
21 | 21 | <div class="col-md-2 adminer-table-column-middle"> |
22 | 22 | <select class="form-control" name="<?php |
23 | 23 | echo $this->prefixFields ?>[collation]" data-field="collation"<?php |
24 | - if($this->field->collationHidden): ?> readonly<?php endif ?>> |
|
24 | + if ($this->field->collationHidden): ?> readonly<?php endif ?>> |
|
25 | 25 | <option value="">(<?php echo $this->trans->lang('collation') ?>)</option> |
26 | -<?php foreach($this->collations as $group => $collations): ?> |
|
27 | -<?php if(is_string($collations)): ?> |
|
28 | - <option <?php if($this->field->collation === $collations): ?>selected<?php |
|
26 | +<?php foreach ($this->collations as $group => $collations): ?> |
|
27 | +<?php if (is_string($collations)): ?> |
|
28 | + <option <?php if ($this->field->collation === $collations): ?>selected<?php |
|
29 | 29 | endif ?>><?php echo $collations ?></option> |
30 | 30 | <?php else: ?> |
31 | 31 | <optgroup label="<?php echo $group ?>"> |
32 | -<?php foreach($collations as $collation): ?> |
|
33 | - <option <?php if($this->field->collation === $collation): ?>selected<?php |
|
32 | +<?php foreach ($collations as $collation): ?> |
|
33 | + <option <?php if ($this->field->collation === $collation): ?>selected<?php |
|
34 | 34 | endif ?>><?php echo $collation ?></option> |
35 | 35 | <?php endforeach ?> |
36 | 36 | </optgroup> |
@@ -39,13 +39,13 @@ discard block |
||
39 | 39 | </select> |
40 | 40 | </div> |
41 | 41 | <div class="col-md-2 adminer-table-column-middle"> |
42 | -<?php if(true/*isset($this->field->onUpdate)*/): ?> |
|
42 | +<?php if (true/*isset($this->field->onUpdate)*/): ?> |
|
43 | 43 | <select class="form-control" name="<?php |
44 | 44 | echo $this->prefixFields ?>[onUpdate]" data-field="onUpdate"<?php |
45 | - if($this->field->onUpdateHidden): ?> readonly<?php endif ?>> |
|
45 | + if ($this->field->onUpdateHidden): ?> readonly<?php endif ?>> |
|
46 | 46 | <option value="">(<?php echo $this->trans->lang('ON UPDATE') ?>)</option> |
47 | -<?php foreach($this->options['onUpdate'] as $group => $option): ?> |
|
48 | - <option <?php if($this->field->onUpdate === $option): ?>selected<?php |
|
47 | +<?php foreach ($this->options['onUpdate'] as $group => $option): ?> |
|
48 | + <option <?php if ($this->field->onUpdate === $option): ?>selected<?php |
|
49 | 49 | endif ?>><?php echo $option ?></option> |
50 | 50 | <?php endforeach ?> |
51 | 51 | </select> |
@@ -62,10 +62,10 @@ discard block |
||
62 | 62 | <div class="col-md-2 adminer-table-column-left second-line"> |
63 | 63 | <select class="form-control" name="<?php |
64 | 64 | echo $this->prefixFields ?>[type]" data-field="type"> |
65 | -<?php foreach($this->field->types as $group => $types): ?> |
|
65 | +<?php foreach ($this->field->types as $group => $types): ?> |
|
66 | 66 | <optgroup label="<?php echo $group ?>"> |
67 | -<?php foreach($types as $type): ?> |
|
68 | - <option <?php if($this->field->type === $type): ?>selected<?php |
|
67 | +<?php foreach ($types as $type): ?> |
|
68 | + <option <?php if ($this->field->type === $type): ?>selected<?php |
|
69 | 69 | endif ?>><?php echo $type ?></option> |
70 | 70 | <?php endforeach ?> |
71 | 71 | </optgroup> |
@@ -76,35 +76,35 @@ discard block |
||
76 | 76 | <input class="form-control" name="<?php |
77 | 77 | echo $this->prefixFields ?>[length]" placeholder="<?php |
78 | 78 | echo $this->trans->lang('Length') ?>" data-field="length"<?php |
79 | - if($this->field->lengthRequired): ?> required<?php endif ?> value="<?php |
|
79 | + if ($this->field->lengthRequired): ?> required<?php endif ?> value="<?php |
|
80 | 80 | echo $this->field->length ?>" size="3"> |
81 | 81 | </div> |
82 | 82 | <label class="col-md-1 adminer-table-column-null second-line"> |
83 | 83 | <input type="checkbox" value="1" name="<?php |
84 | 84 | echo $this->prefixFields ?>[null]" data-field="null" <?php |
85 | - if($this->field->null): ?>checked <?php endif ?>/> Null |
|
85 | + if ($this->field->null): ?>checked <?php endif ?>/> Null |
|
86 | 86 | </label> |
87 | 87 | <div class="col-md-2 adminer-table-column-middle second-line"> |
88 | 88 | <select class="form-control" name="<?php |
89 | 89 | echo $this->prefixFields ?>[unsigned]" data-field="unsigned"<?php |
90 | - if($this->field->unsignedHidden): ?> readonly<?php endif ?>> |
|
90 | + if ($this->field->unsignedHidden): ?> readonly<?php endif ?>> |
|
91 | 91 | <option value=""></option> |
92 | -<?php if($this->unsigned): ?> |
|
93 | -<?php foreach($this->unsigned as $option): ?> |
|
94 | - <option <?php if($this->field->unsigned === $option): ?>selected<?php |
|
92 | +<?php if ($this->unsigned): ?> |
|
93 | +<?php foreach ($this->unsigned as $option): ?> |
|
94 | + <option <?php if ($this->field->unsigned === $option): ?>selected<?php |
|
95 | 95 | endif ?>><?php echo $option ?></option> |
96 | 96 | <?php endforeach ?> |
97 | 97 | <?php endif ?> |
98 | 98 | </select> |
99 | 99 | </div> |
100 | 100 | <div class="col-md-2 adminer-table-column-middle second-line"> |
101 | -<?php if(true/*$this->foreignKeys*/): ?> |
|
101 | +<?php if (true/*$this->foreignKeys*/): ?> |
|
102 | 102 | <select class="form-control" name="<?php |
103 | 103 | echo $this->prefixFields ?>[onDelete]" data-field="onDelete"<?php |
104 | - if($this->field->onDeleteHidden): ?> readonly<?php endif ?>> |
|
104 | + if ($this->field->onDeleteHidden): ?> readonly<?php endif ?>> |
|
105 | 105 | <option value="">(<?php echo $this->trans->lang('ON DELETE') ?>)</option> |
106 | -<?php foreach($this->options['onDelete'] as $option): ?> |
|
107 | - <option <?php if($this->field->onDelete === $option): ?>selected<?php |
|
106 | +<?php foreach ($this->options['onDelete'] as $option): ?> |
|
107 | + <option <?php if ($this->field->onDelete === $option): ?>selected<?php |
|
108 | 108 | endif ?>><?php echo $option ?></option> |
109 | 109 | <?php endforeach ?> |
110 | 110 | </select> |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | <span class="input-group-addon"> |
116 | 116 | <input type="checkbox" value="1" name="<?php |
117 | 117 | echo $this->prefixFields ?>[hasDefault]" data-field="hasDefault" <?php |
118 | - if($this->field->hasDefault): ?>checked <?php endif ?>/> |
|
118 | + if ($this->field->hasDefault): ?>checked <?php endif ?>/> |
|
119 | 119 | </span> |
120 | 120 | <input class="form-control" name="<?php |
121 | 121 | echo $this->prefixFields ?>[default]" data-field="default" value="<?php |
@@ -130,12 +130,12 @@ discard block |
||
130 | 130 | <span class="caret"></span> |
131 | 131 | </button> |
132 | 132 | <ul class="dropdown-menu" data-index="<?php echo $this->index ?>"> |
133 | -<?php if($this->support['move_col']): ?> |
|
133 | +<?php if ($this->support['move_col']): ?> |
|
134 | 134 | <li><a href="#" class="adminer-table-column-add"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a></li> |
135 | 135 | <!-- <li><a href="#" class="adminer-table-column-up"><span class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span></a></li> |
136 | 136 | <li><a href="#" class="adminer-table-column-down"><span class="glyphicon glyphicon-arrow-down" aria-hidden="true"></span></a></li> --> |
137 | 137 | <?php endif ?> |
138 | -<?php if($this->support['drop_col']): ?> |
|
138 | +<?php if ($this->support['drop_col']): ?> |
|
139 | 139 | <li><a href="#" class="adminer-table-column-del"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a></li> |
140 | 140 | <?php endif ?> |
141 | 141 | </ul> |
@@ -143,6 +143,6 @@ discard block |
||
143 | 143 | </div> |
144 | 144 | <!-- End second line --> |
145 | 145 | </div></div> |
146 | -<?php if(isset($this->class)): ?> |
|
146 | +<?php if (isset($this->class)): ?> |
|
147 | 147 | </div> |
148 | 148 | <?php endif ?> |
@@ -7,29 +7,29 @@ discard block |
||
7 | 7 | <input type="text" name="name" class="form-control" value="<?php |
8 | 8 | echo $this->table->name ?>" placeholder="Name" /> |
9 | 9 | </div> |
10 | -<?php if($this->engines): ?> |
|
10 | +<?php if ($this->engines): ?> |
|
11 | 11 | <div class="col-md-2 adminer-edit-table-engine"> |
12 | 12 | <select name="engine" class="form-control"> |
13 | 13 | <option value="">(engine)</option> |
14 | -<?php foreach($this->engines as $group => $engine): ?> |
|
15 | - <option <?php if(!strcasecmp($this->table->engine, $engine)): ?>selected<?php |
|
14 | +<?php foreach ($this->engines as $group => $engine): ?> |
|
15 | + <option <?php if (!strcasecmp($this->table->engine, $engine)): ?>selected<?php |
|
16 | 16 | endif ?>><?php echo $engine ?></option> |
17 | 17 | <?php endforeach ?> |
18 | 18 | </select> |
19 | 19 | </div> |
20 | 20 | <?php endif ?> |
21 | -<?php if($this->collations): ?> |
|
21 | +<?php if ($this->collations): ?> |
|
22 | 22 | <div class="col-md-3 adminer-edit-table-collation"> |
23 | 23 | <select name="collation" class="form-control"> |
24 | 24 | <option value="" selected>(collation)</option> |
25 | -<?php foreach($this->collations as $group => $collations): ?> |
|
26 | -<?php if(is_string($collations)): ?> |
|
27 | - <option <?php if($this->table->collation === $collations): ?>selected<?php |
|
25 | +<?php foreach ($this->collations as $group => $collations): ?> |
|
26 | +<?php if (is_string($collations)): ?> |
|
27 | + <option <?php if ($this->table->collation === $collations): ?>selected<?php |
|
28 | 28 | endif ?>><?php echo $collations ?></option> |
29 | 29 | <?php else: ?> |
30 | 30 | <optgroup label="<?php echo $group ?>"> |
31 | -<?php foreach($collations as $collation): ?> |
|
32 | - <option <?php if($this->table->collation === $collation): ?>selected<?php |
|
31 | +<?php foreach ($collations as $collation): ?> |
|
32 | + <option <?php if ($this->table->collation === $collation): ?>selected<?php |
|
33 | 33 | endif ?>><?php echo $collation ?></option> |
34 | 34 | <?php endforeach ?> |
35 | 35 | </optgroup> |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | </select> |
39 | 39 | </div> |
40 | 40 | <?php endif ?> |
41 | -<?php if($this->support['comment']): ?> |
|
41 | +<?php if ($this->support['comment']): ?> |
|
42 | 42 | <div class="col-md-4 adminer-table-column-middle"> |
43 | 43 | <input name="comment" class="form-control" value="<?php |
44 | 44 | echo $this->table->comment ?>" placeholder="<?php |
@@ -50,18 +50,18 @@ discard block |
||
50 | 50 | <label class="col-md-3 adminer-table-column-left"><?php echo $this->trans->lang('Column') ?></label> |
51 | 51 | <label class="col-md-1 adminer-table-column-null-header" for="autoIncrementCol"> |
52 | 52 | <input type="radio" name="autoIncrementCol" value="0" <?php |
53 | - if(!$this->options['hasAutoIncrement']): ?>checked <?php endif ?>/>AI-P |
|
53 | + if (!$this->options['hasAutoIncrement']): ?>checked <?php endif ?>/>AI-P |
|
54 | 54 | </label> |
55 | 55 | <label class="col-md-7 adminer-table-column-middle"><?php echo $this->trans->lang('Options') ?></label> |
56 | 56 | <div class="col-md-1 adminer-table-column-buttons-header"> |
57 | -<?php if($this->support['columns']): ?> |
|
57 | +<?php if ($this->support['columns']): ?> |
|
58 | 58 | <button type="button" class="btn btn-primary" id="adminer-table-column-add"> |
59 | 59 | <i class="bi bi-plus"></i> |
60 | 60 | </button> |
61 | 61 | <?php endif ?> |
62 | 62 | </div> |
63 | 63 | </div> |
64 | -<?php $index = 0; foreach($this->fields as $field): ?> |
|
64 | +<?php $index = 0; foreach ($this->fields as $field): ?> |
|
65 | 65 | <?php echo $this->render('adminer::views::table/column', [ |
66 | 66 | 'trans' => $this->trans, |
67 | 67 | 'class' => $this->formId . '-column', |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if(isset($this->class)): ?> |
|
1 | +<?php if (isset($this->class)): ?> |
|
2 | 2 | <div class="form-group row <?php echo $this->class ?>" data-index="<?php |
3 | 3 | echo $this->index ?>" id="<?php echo sprintf('%s-%02d', $this->class, $this->index) ?>"> |
4 | 4 | <?php endif ?> |
@@ -14,23 +14,23 @@ discard block |
||
14 | 14 | </div> |
15 | 15 | <label class="col-md-1 adminer-table-column-null" for="autoIncrementCol"> |
16 | 16 | <input type="radio" name="autoIncrementCol" value="<?php echo ($this->index + 1) ?>" <?php |
17 | - if($this->field->autoIncrement): ?>checked <?php endif ?>/> AI |
|
17 | + if ($this->field->autoIncrement): ?>checked <?php endif ?>/> AI |
|
18 | 18 | <input type="checkbox" name="<?php echo $this->prefixFields ?>[primary]" <?php |
19 | - if($this->field->primary): ?>checked <?php endif ?>/> |
|
19 | + if ($this->field->primary): ?>checked <?php endif ?>/> |
|
20 | 20 | </label> |
21 | 21 | <div class="col-md-2 adminer-table-column-middle"> |
22 | 22 | <select class="form-control" name="<?php |
23 | 23 | echo $this->prefixFields ?>[collation]" data-field="collation"<?php |
24 | - if($this->field->collationHidden): ?> readonly<?php endif ?>> |
|
24 | + if ($this->field->collationHidden): ?> readonly<?php endif ?>> |
|
25 | 25 | <option value="">(<?php echo $this->trans->lang('collation') ?>)</option> |
26 | -<?php foreach($this->collations as $group => $collations): ?> |
|
27 | -<?php if(is_string($collations)): ?> |
|
28 | - <option <?php if($this->field->collation === $collations): ?>selected<?php |
|
26 | +<?php foreach ($this->collations as $group => $collations): ?> |
|
27 | +<?php if (is_string($collations)): ?> |
|
28 | + <option <?php if ($this->field->collation === $collations): ?>selected<?php |
|
29 | 29 | endif ?>><?php echo $collations ?></option> |
30 | 30 | <?php else: ?> |
31 | 31 | <optgroup label="<?php echo $group ?>"> |
32 | -<?php foreach($collations as $collation): ?> |
|
33 | - <option <?php if($this->field->collation === $collation): ?>selected<?php |
|
32 | +<?php foreach ($collations as $collation): ?> |
|
33 | + <option <?php if ($this->field->collation === $collation): ?>selected<?php |
|
34 | 34 | endif ?>><?php echo $collation ?></option> |
35 | 35 | <?php endforeach ?> |
36 | 36 | </optgroup> |
@@ -39,13 +39,13 @@ discard block |
||
39 | 39 | </select> |
40 | 40 | </div> |
41 | 41 | <div class="col-md-2 adminer-table-column-middle"> |
42 | -<?php if(true/*isset($this->field->onUpdate)*/): ?> |
|
42 | +<?php if (true/*isset($this->field->onUpdate)*/): ?> |
|
43 | 43 | <select class="form-control" name="<?php |
44 | 44 | echo $this->prefixFields ?>[onUpdate]" data-field="onUpdate"<?php |
45 | - if($this->field->onUpdateHidden): ?> readonly<?php endif ?>> |
|
45 | + if ($this->field->onUpdateHidden): ?> readonly<?php endif ?>> |
|
46 | 46 | <option value="">(<?php echo $this->trans->lang('ON UPDATE') ?>)</option> |
47 | -<?php foreach($this->options['onUpdate'] as $group => $option): ?> |
|
48 | - <option <?php if($this->field->onUpdate === $option): ?>selected<?php |
|
47 | +<?php foreach ($this->options['onUpdate'] as $group => $option): ?> |
|
48 | + <option <?php if ($this->field->onUpdate === $option): ?>selected<?php |
|
49 | 49 | endif ?>><?php echo $option ?></option> |
50 | 50 | <?php endforeach ?> |
51 | 51 | </select> |
@@ -62,10 +62,10 @@ discard block |
||
62 | 62 | <div class="col-md-2 adminer-table-column-left second-line"> |
63 | 63 | <select class="form-control" name="<?php |
64 | 64 | echo $this->prefixFields ?>[type]" data-field="type"> |
65 | -<?php foreach($this->field->types as $group => $types): ?> |
|
65 | +<?php foreach ($this->field->types as $group => $types): ?> |
|
66 | 66 | <optgroup label="<?php echo $group ?>"> |
67 | -<?php foreach($types as $type): ?> |
|
68 | - <option <?php if($this->field->type === $type): ?>selected<?php |
|
67 | +<?php foreach ($types as $type): ?> |
|
68 | + <option <?php if ($this->field->type === $type): ?>selected<?php |
|
69 | 69 | endif ?>><?php echo $type ?></option> |
70 | 70 | <?php endforeach ?> |
71 | 71 | </optgroup> |
@@ -76,35 +76,35 @@ discard block |
||
76 | 76 | <input class="form-control" name="<?php |
77 | 77 | echo $this->prefixFields ?>[length]" placeholder="<?php |
78 | 78 | echo $this->trans->lang('Length') ?>" data-field="length"<?php |
79 | - if($this->field->lengthRequired): ?> required<?php endif ?> value="<?php |
|
79 | + if ($this->field->lengthRequired): ?> required<?php endif ?> value="<?php |
|
80 | 80 | echo $this->field->length ?>" size="3"> |
81 | 81 | </div> |
82 | 82 | <label class="col-md-1 adminer-table-column-null second-line"> |
83 | 83 | <input type="checkbox" value="1" name="<?php |
84 | 84 | echo $this->prefixFields ?>[null]" data-field="null" <?php |
85 | - if($this->field->null): ?>checked <?php endif ?>/> Null |
|
85 | + if ($this->field->null): ?>checked <?php endif ?>/> Null |
|
86 | 86 | </label> |
87 | 87 | <div class="col-md-2 adminer-table-column-middle second-line"> |
88 | 88 | <select class="form-control" name="<?php |
89 | 89 | echo $this->prefixFields ?>[unsigned]" data-field="unsigned"<?php |
90 | - if($this->field->unsignedHidden): ?> readonly<?php endif ?>> |
|
90 | + if ($this->field->unsignedHidden): ?> readonly<?php endif ?>> |
|
91 | 91 | <option value=""></option> |
92 | -<?php if($this->unsigned): ?> |
|
93 | -<?php foreach($this->unsigned as $option): ?> |
|
94 | - <option <?php if($this->field->unsigned === $option): ?>selected<?php |
|
92 | +<?php if ($this->unsigned): ?> |
|
93 | +<?php foreach ($this->unsigned as $option): ?> |
|
94 | + <option <?php if ($this->field->unsigned === $option): ?>selected<?php |
|
95 | 95 | endif ?>><?php echo $option ?></option> |
96 | 96 | <?php endforeach ?> |
97 | 97 | <?php endif ?> |
98 | 98 | </select> |
99 | 99 | </div> |
100 | 100 | <div class="col-md-2 adminer-table-column-middle second-line"> |
101 | -<?php if(true/*$this->foreignKeys*/): ?> |
|
101 | +<?php if (true/*$this->foreignKeys*/): ?> |
|
102 | 102 | <select class="form-control" name="<?php |
103 | 103 | echo $this->prefixFields ?>[onDelete]" data-field="onDelete"<?php |
104 | - if($this->field->onDeleteHidden): ?> readonly<?php endif ?>> |
|
104 | + if ($this->field->onDeleteHidden): ?> readonly<?php endif ?>> |
|
105 | 105 | <option value="">(<?php echo $this->trans->lang('ON DELETE') ?>)</option> |
106 | -<?php foreach($this->options['onDelete'] as $option): ?> |
|
107 | - <option <?php if($this->field->onDelete === $option): ?>selected<?php |
|
106 | +<?php foreach ($this->options['onDelete'] as $option): ?> |
|
107 | + <option <?php if ($this->field->onDelete === $option): ?>selected<?php |
|
108 | 108 | endif ?>><?php echo $option ?></option> |
109 | 109 | <?php endforeach ?> |
110 | 110 | </select> |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | <div class="input-group-text"> |
117 | 117 | <input type="checkbox" value="1" name="<?php |
118 | 118 | echo $this->prefixFields ?>[hasDefault]" data-field="hasDefault" <?php |
119 | - if($this->field->hasDefault): ?>checked <?php endif ?>/> |
|
119 | + if ($this->field->hasDefault): ?>checked <?php endif ?>/> |
|
120 | 120 | </div> |
121 | 121 | </div> |
122 | 122 | <input class="form-control" name="<?php |
@@ -131,12 +131,12 @@ discard block |
||
131 | 131 | echo $this->index ?>" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
132 | 132 | </button> |
133 | 133 | <div class="dropdown-menu" aria-labelledby="adminer-table-column-button-group-drop-<?php echo $this->index ?>"> |
134 | -<?php if($this->support['move_col']): ?> |
|
134 | +<?php if ($this->support['move_col']): ?> |
|
135 | 135 | <a class="dropdown-item adminer-table-column-add" href="#"><i class="bi bi-plus"></i></a> |
136 | 136 | <!-- <a class="dropdown-item adminer-table-column-up" href="#"><i class="bi bi-arrow-up"></i></a> |
137 | 137 | <a class="dropdown-item adminer-table-column-down" href="#"><i class="bi bi-arrow-down"></i></a> --> |
138 | 138 | <?php endif ?> |
139 | -<?php if($this->support['drop_col']): ?> |
|
139 | +<?php if ($this->support['drop_col']): ?> |
|
140 | 140 | <a class="dropdown-item adminer-table-column-del" href="#"><i class="bi bi-x"></i></a> |
141 | 141 | <?php endif ?> |
142 | 142 | </div> |
@@ -144,6 +144,6 @@ discard block |
||
144 | 144 | </div> |
145 | 145 | <!-- End second line --> |
146 | 146 | </div></div> |
147 | -<?php if(isset($this->class)): ?> |
|
147 | +<?php if (isset($this->class)): ?> |
|
148 | 148 | </div> |
149 | 149 | <?php endif ?> |