@@ -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>"; |
@@ -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 | /** |