@@ -913,11 +913,9 @@ |
||
913 | 913 | if ($link === null) { |
914 | 914 | if ($this->isMail($value)) { |
915 | 915 | $link = "mailto:$value"; |
916 | - } |
|
917 | - elseif ($this->isUrl($value)) { |
|
916 | + } elseif ($this->isUrl($value)) { |
|
918 | 917 | $link = $value; // IE 11 and all modern browsers hide referrer |
919 | - } |
|
920 | - else { |
|
918 | + } else { |
|
921 | 919 | $link = ''; |
922 | 920 | } |
923 | 921 | } |
@@ -517,9 +517,8 @@ discard block |
||
517 | 517 | \preg_match_all("~'((?:[^']|'')*)'~", $field->length, $matches); |
518 | 518 | foreach ($matches[1] as $i => $val) { |
519 | 519 | $val = \stripcslashes(\str_replace("''", "'", $val)); |
520 | - $checked = (\is_int($value) ? $value == $i + 1 : |
|
521 | - (\is_array($value) ? \in_array($i+1, $value) : $value === $val)); |
|
522 | - $inputs[] = "<label><input type='$type'$attrs value='" . ($i+1) . "'" . |
|
520 | + $checked = (\is_int($value) ? $value == $i + 1 : (\is_array($value) ? \in_array($i + 1, $value) : $value === $val)); |
|
521 | + $inputs[] = "<label><input type='$type'$attrs value='" . ($i + 1) . "'" . |
|
523 | 522 | ($checked ? ' checked' : '') . '>' . $this->html($this->editValue($val, $field)) . '</label>'; |
524 | 523 | } |
525 | 524 | |
@@ -583,8 +582,7 @@ discard block |
||
583 | 582 | } |
584 | 583 | $enumLength = $this->driver->enumLength(); |
585 | 584 | return (\preg_match("~^\\s*\\(?\\s*$enumLength(?:\\s*,\\s*$enumLength)*+\\s*\\)?\\s*\$~", $length) && |
586 | - \preg_match_all("~$enumLength~", $length, $matches) ? "(" . \implode(",", $matches[0]) . ")" : |
|
587 | - \preg_replace('~^[0-9].*~', '(\0)', \preg_replace('~[^-0-9,+()[\]]~', '', $length)) |
|
585 | + \preg_match_all("~$enumLength~", $length, $matches) ? "(" . \implode(",", $matches[0]) . ")" : \preg_replace('~^[0-9].*~', '(\0)', \preg_replace('~[^-0-9,+()[\]]~', '', $length)) |
|
588 | 586 | ); |
589 | 587 | } |
590 | 588 | |
@@ -755,7 +753,7 @@ discard block |
||
755 | 753 | $expressions = []; |
756 | 754 | foreach ($indexes as $i => $index) { |
757 | 755 | if ($index->type == "FULLTEXT" && $this->input->values["fulltext"][$i] != "") { |
758 | - $columns = \array_map(function ($column) { |
|
756 | + $columns = \array_map(function($column) { |
|
759 | 757 | return $this->driver->escapeId($column); |
760 | 758 | }, $index->columns); |
761 | 759 | $expressions[] = "MATCH (" . \implode(", ", $columns) . ") AGAINST (" . |
@@ -873,8 +871,7 @@ discard block |
||
873 | 871 | */ |
874 | 872 | private function _selectValue(string $value, string $link, string $type, string $original) |
875 | 873 | { |
876 | - $clause = ($value === null ? "<i>NULL</i>" : |
|
877 | - (\preg_match("~char|binary|boolean~", $type) && !\preg_match("~var~", $type) ? |
|
874 | + $clause = ($value === null ? "<i>NULL</i>" : (\preg_match("~char|binary|boolean~", $type) && !\preg_match("~var~", $type) ? |
|
878 | 875 | "<code>$value</code>" : $value)); |
879 | 876 | if (\preg_match('~blob|bytea|raw|file~', $type) && !$this->isUtf8($value)) { |
880 | 877 | $clause = "<i>" . $this->trans->lang('%d byte(s)', \strlen($original)) . "</i>"; |
@@ -127,11 +127,9 @@ |
||
127 | 127 | // different forms for 1, 2-4 except 12-14, other |
128 | 128 | : ($this->language == 'pl' ? ($number % 10 > 1 && $number % 10 < 5 && $number / 10 % 10 != 1 ? 1 : 2) |
129 | 129 | // different forms for 1, 2, 3-4, other |
130 | - : ($this->language == 'sl' ? ($number % 100 == 1 ? 0 : ($number % 100 == 2 ? 1 : |
|
131 | - ($number % 100 == 3 || $number % 100 == 4 ? 2 : 3))) |
|
130 | + : ($this->language == 'sl' ? ($number % 100 == 1 ? 0 : ($number % 100 == 2 ? 1 : ($number % 100 == 3 || $number % 100 == 4 ? 2 : 3))) |
|
132 | 131 | // different forms for 1, 12-19, other |
133 | - : ($this->language == 'lt' ? ($number % 10 == 1 && $number % 100 != 11 ? 0 : |
|
134 | - ($number % 10 > 1 && $number / 10 % 10 != 1 ? 1 : 2)) |
|
132 | + : ($this->language == 'lt' ? ($number % 10 == 1 && $number % 100 != 11 ? 0 : ($number % 10 > 1 && $number / 10 % 10 != 1 ? 1 : 2)) |
|
135 | 133 | // different forms for 1 except 11, 2-4 except 12-14, other |
136 | 134 | : ($this->language == 'bs' || $this->language == 'ru' || $this->language == 'sr' || $this->language == 'uk' ? |
137 | 135 | ($number % 10 == 1 && $number % 100 != 11 ? 0 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | __DIR__ . '/../app/Ajax' => [ |
6 | 6 | 'namespace' => 'Lagdo\\DbAdmin\\App\\Ajax', |
7 | 7 | 'autoload' => false, |
8 | - 'classes' => require( __DIR__ . '/classes.php'), |
|
8 | + 'classes' => require(__DIR__ . '/classes.php'), |
|
9 | 9 | ], |
10 | 10 | ], |
11 | 11 | 'views' => [ |
@@ -11,9 +11,9 @@ |
||
11 | 11 | <div class="col-md-8"> |
12 | 12 | <select name="collation" class="form-control"> |
13 | 13 | <option value="" selected>(collation)</option> |
14 | -<?php foreach($this->collations as $group => $collations): ?> |
|
14 | +<?php foreach ($this->collations as $group => $collations): ?> |
|
15 | 15 | <optgroup label="<?php echo $group ?>"> |
16 | -<?php foreach($collations as $collation): ?> |
|
16 | +<?php foreach ($collations as $collation): ?> |
|
17 | 17 | <option><?php echo $collation ?></option> |
18 | 18 | <?php endforeach ?> |
19 | 19 | </optgroup> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <!-- <div class="row row-no-gutters"> |
2 | -<?php $i = 0; foreach($this->options['select'] as $key => $value): ?> |
|
2 | +<?php $i = 0; foreach ($this->options['select'] as $key => $value): ?> |
|
3 | 3 | <div class="col-md-7"> |
4 | 4 | <input class="form-control" name="columns[<?php |
5 | 5 | echo $i ?>][fun]" value="<?php echo $this->options['values'][$key]['fun'] ?>" /> |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | <?php $i++; endforeach ?> |
12 | 12 | </div> --> |
13 | 13 | <div class="row row-no-gutters"> |
14 | -<?php $i = 0; foreach($this->options['values'] as $value): ?> |
|
14 | +<?php $i = 0; foreach ($this->options['values'] as $value): ?> |
|
15 | 15 | <div class="col-md-7"> |
16 | 16 | <input class="form-control" name="columns[<?php |
17 | 17 | echo $i ?>][fun]" value="<?php echo $value['fun'] ?>" /> |
@@ -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-6"> |
4 | 4 | <input class="form-control" name="order[<?php |
5 | 5 | echo $i ?>]" value="<?php echo $value['col'] ?>" /> |
@@ -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 ?> |