@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <div class="row row-no-gutters"> |
| 2 | -<?php $i = 0; foreach($this->options['values'] as $value): ?> |
|
| 2 | +<?php $i = 0; foreach ($this->options['values'] as $value): ?> |
|
| 3 | 3 | <div class="col-md-4"> |
| 4 | 4 | <input class="form-control" name="where[<?php |
| 5 | 5 | echo $i ?>][col]" value="<?php echo $value['col'] ?>" /> |
@@ -1,18 +1,18 @@ |
||
| 1 | -<?php if(is_array($this->headers)): ?> |
|
| 1 | +<?php if (is_array($this->headers)): ?> |
|
| 2 | 2 | -- Adminer <?php echo $this->headers['version'], ' ', |
| 3 | 3 | $this->headers['driver'], ' ', |
| 4 | 4 | $this->headers['server'] ?> dump |
| 5 | 5 | |
| 6 | -<?php if(($this->headers['sql'])): ?> |
|
| 6 | +<?php if (($this->headers['sql'])): ?> |
|
| 7 | 7 | SET NAMES utf8; |
| 8 | 8 | SET time_zone = '+00:00'; |
| 9 | 9 | SET foreign_key_checks = 0; |
| 10 | -<?php if(($this->headers['data_style'])): ?> |
|
| 10 | +<?php if (($this->headers['data_style'])): ?> |
|
| 11 | 11 | SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; |
| 12 | 12 | <?php endif ?> |
| 13 | 13 | <?php endif ?> |
| 14 | 14 | |
| 15 | 15 | <?php endif ?> |
| 16 | -<?php foreach($this->queries as $query): ?> |
|
| 16 | +<?php foreach ($this->queries as $query): ?> |
|
| 17 | 17 | <?php echo $query, "\n" ?> |
| 18 | 18 | <?php endforeach ?> |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <select class="form-control"> |
| 2 | -<?php foreach($this->options as $option): ?> |
|
| 2 | +<?php foreach ($this->options as $option): ?> |
|
| 3 | 3 | <option class="<?php echo $this->optionClass ?>" value="<?php |
| 4 | 4 | echo htmlentities($option) ?>"><?php echo $option ?></option> |
| 5 | 5 | <?php endforeach ?> |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <select class="form-control"> |
| 2 | -<?php foreach($this->options as $value => $label): ?> |
|
| 2 | +<?php foreach ($this->options as $value => $label): ?> |
|
| 3 | 3 | <option value="<?php echo htmlentities($value) ?>"><?php echo $label ?></option> |
| 4 | 4 | <?php endforeach ?> |
| 5 | 5 | </select> |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <div class="input-group"> |
| 2 | -<?php if(isset($this->schemas) && ($this->schemas)): ?> |
|
| 2 | +<?php if (isset($this->schemas) && ($this->schemas)): ?> |
|
| 3 | 3 | <select class="form-control" id="adminer-schema-select"> |
| 4 | -<?php foreach($this->schemas as $schema): ?> |
|
| 4 | +<?php foreach ($this->schemas as $schema): ?> |
|
| 5 | 5 | <option value="<?php echo $schema ?>"><?php echo $schema ?></option> |
| 6 | 6 | <?php endforeach ?> |
| 7 | 7 | </select> |
@@ -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 | } |
@@ -526,8 +526,7 @@ |
||
| 526 | 526 | } |
| 527 | 527 | |
| 528 | 528 | $this->dumpTablesAndViews($database); |
| 529 | - } |
|
| 530 | - catch (\Exception $e) { |
|
| 529 | + } catch (\Exception $e) { |
|
| 531 | 530 | return $e->getMessage(); |
| 532 | 531 | } |
| 533 | 532 | } |
@@ -101,8 +101,7 @@ discard block |
||
| 101 | 101 | $maxlength = (!\preg_match('~int~', $field->type) && |
| 102 | 102 | \preg_match('~^(\d+)(,(\d+))?$~', $field->length, $match) ? |
| 103 | 103 | ((\preg_match("~binary~", $field->type) ? 2 : 1) * $match[1] + (($match[3] ?? null) ? 1 : 0) + |
| 104 | - (($match[2] ?? false) && !$unsigned ? 1 : 0)) : |
|
| 105 | - ($this->driver->typeExists($field->type) ? $this->driver->type($field->type) + ($unsigned ? 0 : 1) : 0)); |
|
| 104 | + (($match[2] ?? false) && !$unsigned ? 1 : 0)) : ($this->driver->typeExists($field->type) ? $this->driver->type($field->type) + ($unsigned ? 0 : 1) : 0)); |
|
| 106 | 105 | if ($this->driver->jush() == 'sql' && $this->driver->minVersion(5.6) && \preg_match('~time~', $field->type)) { |
| 107 | 106 | $maxlength += 7; // microtime |
| 108 | 107 | } |
@@ -243,8 +242,7 @@ discard block |
||
| 243 | 242 | $value = ( |
| 244 | 243 | $row !== null ? ( |
| 245 | 244 | $row[$name] != "" && $this->driver->jush() == "sql" && \preg_match("~enum|set~", $field->type) ? |
| 246 | - (\is_array($row[$name]) ? \array_sum($row[$name]) : +$row[$name]) : |
|
| 247 | - (\is_bool($row[$name]) ? +$row[$name] : $row[$name]) |
|
| 245 | + (\is_array($row[$name]) ? \array_sum($row[$name]) : +$row[$name]) : (\is_bool($row[$name]) ? +$row[$name] : $row[$name]) |
|
| 248 | 246 | ) : ( |
| 249 | 247 | !$update && $field->autoIncrement ? "" : (isset($queryOptions["select"]) ? false : $default) |
| 250 | 248 | ) |
@@ -254,7 +252,7 @@ discard block |
||
| 254 | 252 | } |
| 255 | 253 | $function = ( |
| 256 | 254 | $queryOptions["save"] |
| 257 | - ? (string)$queryOptions["function"][$name] |
|
| 255 | + ? (string) $queryOptions["function"][$name] |
|
| 258 | 256 | : ( |
| 259 | 257 | $update && \preg_match('~^CURRENT_TIMESTAMP~i', $field->onUpdate) |
| 260 | 258 | ? "now" |