@@ -45,8 +45,7 @@ |
||
| 45 | 45 | // From table.inc.php |
| 46 | 46 | $status = $this->status($view); |
| 47 | 47 | $name = $this->admin->tableName($status); |
| 48 | - $title = ($status->engine == 'materialized view' ? $this->utils->trans->lang('Materialized view') : |
|
| 49 | - $this->utils->trans->lang('View')) . ': ' . ($name != '' ? $name : $this->utils->str->html($view)); |
|
| 48 | + $title = ($status->engine == 'materialized view' ? $this->utils->trans->lang('Materialized view') : $this->utils->trans->lang('View')) . ': ' . ($name != '' ? $name : $this->utils->str->html($view)); |
|
| 50 | 49 | |
| 51 | 50 | $comment = $status->comment; |
| 52 | 51 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function getSelectData(string $table, array $queryOptions = []): array |
| 140 | 140 | { |
| 141 | - [$options, $query, , , , , , , , , $limit, $page] = $this->prepareSelect($table, $queryOptions); |
|
| 141 | + [$options, $query,,,,,,,,, $limit, $page] = $this->prepareSelect($table, $queryOptions); |
|
| 142 | 142 | $query = $this->utils->str->html($query); |
| 143 | 143 | |
| 144 | 144 | return compact('options', 'query', 'limit', 'page'); |
@@ -338,13 +338,13 @@ discard block |
||
| 338 | 338 | */ |
| 339 | 339 | public function countSelect(string $table, array $queryOptions): int |
| 340 | 340 | { |
| 341 | - [, , $select, , , , , $where, $group] = $this->prepareSelect($table, $queryOptions); |
|
| 341 | + [,, $select,,,,, $where, $group] = $this->prepareSelect($table, $queryOptions); |
|
| 342 | 342 | |
| 343 | 343 | try { |
| 344 | 344 | $isGroup = count($group) < count($select); |
| 345 | 345 | $query = $this->driver->getRowCountQuery($table, $where, $isGroup, $group); |
| 346 | - return (int)$this->driver->result($query); |
|
| 347 | - } catch(Exception $_) { |
|
| 346 | + return (int) $this->driver->result($query); |
|
| 347 | + } catch (Exception $_) { |
|
| 348 | 348 | return -1; |
| 349 | 349 | } |
| 350 | 350 | } |
@@ -360,8 +360,8 @@ discard block |
||
| 360 | 360 | */ |
| 361 | 361 | public function execSelect(string $table, array $queryOptions): array |
| 362 | 362 | { |
| 363 | - [, $query, $select, $fields, , , $indexes, $where, $group, , $limit, $page, |
|
| 364 | - $textLength, , $unselected] = $this->prepareSelect($table, $queryOptions); |
|
| 363 | + [, $query, $select, $fields,,, $indexes, $where, $group,, $limit, $page, |
|
| 364 | + $textLength,, $unselected] = $this->prepareSelect($table, $queryOptions); |
|
| 365 | 365 | |
| 366 | 366 | [$rows, $duration] = $this->executeSelect($query, $page); |
| 367 | 367 | if (!$rows) { |
@@ -200,14 +200,14 @@ |
||
| 200 | 200 | $target .= '<b>' . $this->utils->str->html($foreignKey->schema) . '</b>.'; |
| 201 | 201 | } |
| 202 | 202 | $target = $this->utils->str->html($foreignKey->table) . |
| 203 | - '(' . implode(', ', array_map(function ($key) { |
|
| 203 | + '(' . implode(', ', array_map(function($key) { |
|
| 204 | 204 | return $this->utils->str->html($key); |
| 205 | 205 | }, $foreignKey->target)) . ')'; |
| 206 | 206 | $details[] = [ |
| 207 | 207 | 'name' => $this->utils->str->html($name), |
| 208 | 208 | 'source' => '<i>' . implode( |
| 209 | 209 | '</i>, <i>', |
| 210 | - array_map(function ($key) { |
|
| 210 | + array_map(function($key) { |
|
| 211 | 211 | return $this->utils->str->html($key); |
| 212 | 212 | }, $foreignKey->source) |
| 213 | 213 | ) . '</i>', |
@@ -619,8 +619,7 @@ |
||
| 619 | 619 | foreach (array_unique(array_merge($databases['list'], $databases['data'])) as $database) { |
| 620 | 620 | try { |
| 621 | 621 | $this->dumpDatabase($database); |
| 622 | - } |
|
| 623 | - catch (Exception $e) { |
|
| 622 | + } catch (Exception $e) { |
|
| 624 | 623 | return $e->getMessage(); |
| 625 | 624 | } |
| 626 | 625 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $col = $value['col']; |
| 85 | 85 | $prefix = ''; |
| 86 | 86 | if ($op === 'FIND_IN_SET') { |
| 87 | - $prefix = $op .'(' . $this->driver->quote($value['val']) . ', '; |
|
| 87 | + $prefix = $op . '(' . $this->driver->quote($value['val']) . ', '; |
|
| 88 | 88 | } |
| 89 | 89 | $condition = $this->getWhereCondition($value, $fields); |
| 90 | 90 | if ($col !== '') { |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | private function getMatchExpression(IndexEntity $index, int $i): string |
| 115 | 115 | { |
| 116 | - $columns = array_map(function ($column) { |
|
| 116 | + $columns = array_map(function($column) { |
|
| 117 | 117 | return $this->driver->escapeId($column); |
| 118 | 118 | }, $index->columns); |
| 119 | 119 | $match = $this->driver->quote($this->utils->input->values['fulltext'][$i]); |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | foreach ((array) $this->utils->input->values['where'] as $value) { |
| 143 | - if (($value['col'] !== '' || $value['val'] !== '') && |
|
| 143 | + if (($value['col'] !== '' || $value['val'] !== '') && |
|
| 144 | 144 | in_array($value['op'], $this->driver->operators())) { |
| 145 | 145 | $expressions[] = $this->getSelectExpression($value, $fields); |
| 146 | 146 | } |
@@ -147,8 +147,7 @@ |
||
| 147 | 147 | } |
| 148 | 148 | if ($this->isMail($value)) { |
| 149 | 149 | return '<a href="' . $this->utils->str->html("mailto:$value") . '">' . $value . '</a>'; |
| 150 | - } |
|
| 151 | - elseif ($this->isUrl($value)) { |
|
| 150 | + } elseif ($this->isUrl($value)) { |
|
| 152 | 151 | // IE 11 and all modern browsers hide referrer |
| 153 | 152 | return '<a href="' . $this->utils->str->html($value) . '"' . $this->blankTarget() . '>' . $value . '</a>'; |
| 154 | 153 | } |
@@ -1,26 +1,26 @@ |
||
| 1 | -<?php if(is_array($this->headers)): ?> |
|
| 1 | +<?php if (is_array($this->headers)): ?> |
|
| 2 | 2 | <thead> |
| 3 | 3 | <tr> |
| 4 | -<?php if(isset($this->checkbox)): ?> |
|
| 4 | +<?php if (isset($this->checkbox)): ?> |
|
| 5 | 5 | <th class="dbadmin-table-checkbox"><input id="dbadmin-table-<?php |
| 6 | 6 | echo $this->checkbox ?>-all" type="checkbox" /></th> |
| 7 | 7 | <?php endif ?> |
| 8 | -<?php foreach($this->headers as $header): ?> |
|
| 8 | +<?php foreach ($this->headers as $header): ?> |
|
| 9 | 9 | <th><?php echo $header ?></th> |
| 10 | 10 | <?php endforeach ?> |
| 11 | 11 | </tr> |
| 12 | 12 | </thead> |
| 13 | 13 | <?php endif ?> |
| 14 | 14 | <tbody> |
| 15 | -<?php foreach($this->details as $details): ?> |
|
| 15 | +<?php foreach ($this->details as $details): ?> |
|
| 16 | 16 | <tr> |
| 17 | -<?php if(isset($this->checkbox)): ?> |
|
| 17 | +<?php if (isset($this->checkbox)): ?> |
|
| 18 | 18 | <td><input type="checkbox" class="dbadmin-table-<?php echo |
| 19 | 19 | $this->checkbox ?>" name="<?php echo $this->checkbox ?>[]" /></td> |
| 20 | 20 | <?php endif ?> |
| 21 | -<?php foreach($details as $detail): ?> |
|
| 22 | -<?php if(is_array($detail)): ?> |
|
| 23 | - <td<?php foreach($detail['props'] as $name => $value): ?> <?php |
|
| 21 | +<?php foreach ($details as $detail): ?> |
|
| 22 | +<?php if (is_array($detail)): ?> |
|
| 23 | + <td<?php foreach ($detail['props'] as $name => $value): ?> <?php |
|
| 24 | 24 | echo $name ?>="<?php echo $value ?>"<?php |
| 25 | 25 | endforeach ?>><?php echo $detail['label'] ?></td> |
| 26 | 26 | <?php else: ?> |
@@ -1,18 +1,18 @@ |
||
| 1 | -<?php if(is_array($this->headers)): ?> |
|
| 1 | +<?php if (is_array($this->headers)): ?> |
|
| 2 | 2 | -- Jaxon DbAdmin <?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,13 +1,13 @@ |
||
| 1 | 1 | <nav><ul class="pagination"><?php |
| 2 | - if(($this->prev)) |
|
| 2 | + if (($this->prev)) |
|
| 3 | 3 | { |
| 4 | 4 | echo $this->prev; |
| 5 | 5 | } |
| 6 | - foreach($this->links as $link) |
|
| 6 | + foreach ($this->links as $link) |
|
| 7 | 7 | { |
| 8 | 8 | echo $link; |
| 9 | 9 | } |
| 10 | - if(($this->next)) |
|
| 10 | + if (($this->next)) |
|
| 11 | 11 | { |
| 12 | 12 | echo $this->next; |
| 13 | 13 | } |