@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | \ini_set('memory_limit', \max($this->util->iniBytes('memory_limit'), |
197 | 197 | 2 * \strlen($queries) + \memory_get_usage() + 8e6)); |
198 | 198 | } |
199 | - catch(\Exception $e) { |
|
199 | + catch (\Exception $e) { |
|
200 | 200 | // Do nothing if the option is not modified. |
201 | 201 | } |
202 | 202 | } |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | if ($commands === 0) { |
236 | 236 | $messages[] = $this->trans->lang('No commands to execute.'); |
237 | 237 | } elseif ($onlyErrors) { |
238 | - $messages[] = $this->trans->lang('%d query(s) executed OK.', $commands - $errors); |
|
238 | + $messages[] = $this->trans->lang('%d query(s) executed OK.', $commands - $errors); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | return ['results' => $this->results, 'messages' => $messages]; |
@@ -1,14 +1,14 @@ |
||
1 | 1 | <ul class="pagination"> |
2 | 2 | <?php |
3 | - if(($this->prev)) |
|
3 | + if (($this->prev)) |
|
4 | 4 | { |
5 | 5 | echo $this->prev; |
6 | 6 | } |
7 | - foreach($this->links as $link) |
|
7 | + foreach ($this->links as $link) |
|
8 | 8 | { |
9 | 9 | echo $link; |
10 | 10 | } |
11 | - if(($this->next)) |
|
11 | + if (($this->next)) |
|
12 | 12 | { |
13 | 13 | echo $this->next; |
14 | 14 | } |
@@ -1,15 +1,15 @@ |
||
1 | 1 | <nav aria-label=""> |
2 | 2 | <ul class="pagination"> |
3 | 3 | <?php |
4 | - if(($this->prev)) |
|
4 | + if (($this->prev)) |
|
5 | 5 | { |
6 | 6 | echo $this->prev; |
7 | 7 | } |
8 | - foreach($this->links as $link) |
|
8 | + foreach ($this->links as $link) |
|
9 | 9 | { |
10 | 10 | echo $link; |
11 | 11 | } |
12 | - if(($this->next)) |
|
12 | + if (($this->next)) |
|
13 | 13 | { |
14 | 14 | echo $this->next; |
15 | 15 | } |
@@ -100,8 +100,7 @@ discard block |
||
100 | 100 | $maxlength = (!\preg_match('~int~', $field->type) && |
101 | 101 | \preg_match('~^(\d+)(,(\d+))?$~', $field->length, $match) ? |
102 | 102 | ((\preg_match("~binary~", $field->type) ? 2 : 1) * $match[1] + (($match[3] ?? null) ? 1 : 0) + |
103 | - (($match[2] ?? false) && !$unsigned ? 1 : 0)) : |
|
104 | - ($this->driver->typeExists($field->type) ? $this->driver->type($field->type) + ($unsigned ? 0 : 1) : 0)); |
|
103 | + (($match[2] ?? false) && !$unsigned ? 1 : 0)) : ($this->driver->typeExists($field->type) ? $this->driver->type($field->type) + ($unsigned ? 0 : 1) : 0)); |
|
105 | 104 | if ($this->driver->jush() == 'sql' && $this->driver->minVersion(5.6) && \preg_match('~time~', $field->type)) { |
106 | 105 | $maxlength += 7; // microtime |
107 | 106 | } |
@@ -241,12 +240,8 @@ discard block |
||
241 | 240 | // } |
242 | 241 | $value = ($row !== null ? |
243 | 242 | ($row[$name] != "" && $this->driver->jush() == "sql" && \preg_match("~enum|set~", $field->type) ? |
244 | - (\is_array($row[$name]) ? \array_sum($row[$name]) : +$row[$name]) : |
|
245 | - (\is_bool($row[$name]) ? +$row[$name] : $row[$name])) : |
|
246 | - (!$update && $field->autoIncrement ? "" : (isset($queryOptions["select"]) ? false : $default))); |
|
247 | - $function = ($queryOptions["save"] ? (string)$queryOptions["function"][$name] : |
|
248 | - ($update && \preg_match('~^CURRENT_TIMESTAMP~i', $field->onUpdate) ? "now" : |
|
249 | - ($value === false ? null : ($value !== null ? '' : 'NULL')))); |
|
243 | + (\is_array($row[$name]) ? \array_sum($row[$name]) : +$row[$name]) : (\is_bool($row[$name]) ? +$row[$name] : $row[$name])) : (!$update && $field->autoIncrement ? "" : (isset($queryOptions["select"]) ? false : $default))); |
|
244 | + $function = ($queryOptions["save"] ? (string) $queryOptions["function"][$name] : ($update && \preg_match('~^CURRENT_TIMESTAMP~i', $field->onUpdate) ? "now" : ($value === false ? null : ($value !== null ? '' : 'NULL')))); |
|
250 | 245 | if (!$update && $value == $field->default && \preg_match('~^[\w.]+\(~', $value)) { |
251 | 246 | $function = "SQL"; |
252 | 247 | } |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | { |
202 | 202 | $servers = $this->getConfig()->getOption('servers', []); |
203 | 203 | $default = $this->getConfig()->getOption('default', ''); |
204 | - if(array_key_exists($default, $servers)) |
|
204 | + if (array_key_exists($default, $servers)) |
|
205 | 205 | { |
206 | 206 | return $default; |
207 | 207 | } |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | */ |
257 | 257 | public function getReadyScript() |
258 | 258 | { |
259 | - if(!($server = $this->getDefaultServer())) |
|
259 | + if (!($server = $this->getDefaultServer())) |
|
260 | 260 | { |
261 | 261 | return ''; |
262 | 262 | } |