@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | 'not_installed' => 0, |
170 | 170 | ] |
171 | 171 | )->fetch_callback( |
172 | - function ($row) use (&$found, &$installed) { |
|
172 | + function($row) use (&$found, &$installed) { |
|
173 | 173 | // Already found this? If so don't add it twice! |
174 | 174 | if (in_array((int) $row['package_id'], $found, true)) |
175 | 175 | { |
@@ -1528,7 +1528,7 @@ discard block |
||
1528 | 1528 | $fileFunc = FileFunctions::instance(); |
1529 | 1529 | |
1530 | 1530 | // The files that reside outside of sources, in the base, we add manually |
1531 | - $base_files = ['index.php', 'SSI.php', 'subscriptions.php', 'email_imap_cron.php', 'emailpost.php', 'emailtopic.php']; |
|
1531 | + $base_files = ['index.php', 'SSI.php', 'subscriptions.php', 'email_imap_cron.php', 'emailpost.php', 'emailtopic.php']; |
|
1532 | 1532 | foreach ($base_files as $file) |
1533 | 1533 | { |
1534 | 1534 | if ($fileFunc->fileExists(BOARDDIR . '/' . $file)) |
@@ -1554,7 +1554,7 @@ discard block |
||
1554 | 1554 | 'theme_dir' => 'theme_dir', |
1555 | 1555 | ] |
1556 | 1556 | )->fetch_callback( |
1557 | - function ($row) use (&$dirs, $use_relative_paths) { |
|
1557 | + function($row) use (&$dirs, $use_relative_paths) { |
|
1558 | 1558 | $dirs[$row['value']] = $use_relative_paths ? 'themes/' . basename($row['value']) . '/' : strtr($row['value'] . '/', '\\', '/'); |
1559 | 1559 | } |
1560 | 1560 | ); |
@@ -1774,7 +1774,7 @@ discard block |
||
1774 | 1774 | 'install_id' => $install_id, |
1775 | 1775 | ] |
1776 | 1776 | )->fetch_callback( |
1777 | - function ($row) use (&$result) { |
|
1777 | + function($row) use (&$result) { |
|
1778 | 1778 | $result = [ |
1779 | 1779 | 'old_themes' => explode(',', $row['themes_installed']), |
1780 | 1780 | 'old_version' => $row['version'], |
@@ -1844,7 +1844,7 @@ discard block |
||
1844 | 1844 | 'current_package' => $id, |
1845 | 1845 | ] |
1846 | 1846 | )->fetch_callback( |
1847 | - function ($row) use (&$version) { |
|
1847 | + function($row) use (&$version) { |
|
1848 | 1848 | $version = $row['version']; |
1849 | 1849 | } |
1850 | 1850 | ); |
@@ -54,7 +54,7 @@ |
||
54 | 54 | 'redirect_expires' => time(), |
55 | 55 | ] |
56 | 56 | )->fetch_callback( |
57 | - static function ($row) use (&$topics) { |
|
57 | + static function($row) use (&$topics) { |
|
58 | 58 | if (isset($row[0])) |
59 | 59 | { |
60 | 60 | $topics[] = (int) $row[0]; |
@@ -1722,7 +1722,7 @@ |
||
1722 | 1722 | } |
1723 | 1723 | |
1724 | 1724 | $found = false; |
1725 | - $url = preg_replace_callback($pattern, static function ($match) use (&$found) { |
|
1725 | + $url = preg_replace_callback($pattern, static function($match) use (&$found) { |
|
1726 | 1726 | $found = true; |
1727 | 1727 | |
1728 | 1728 | return strtolower($match[0]); |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | } |
619 | 619 | |
620 | 620 | // Attempt to unserialize, mask errors |
621 | - set_error_handler(static function () { /* ignore errors */ }); |
|
621 | + set_error_handler(static function() { /* ignore errors */ }); |
|
622 | 622 | try |
623 | 623 | { |
624 | 624 | if (unserialize($string, ['allowed_classes' => false]) !== false) |
@@ -709,7 +709,7 @@ discard block |
||
709 | 709 | |
710 | 710 | return preg_replace_callback( |
711 | 711 | '/%[A-Za-z]{1}/', |
712 | - static function ($matches) use ($timestamp, $date_equivalents) { |
|
712 | + static function($matches) use ($timestamp, $date_equivalents) { |
|
713 | 713 | $new_format = str_replace(array_keys($date_equivalents), array_values($date_equivalents), $matches[0]); |
714 | 714 | return date($new_format, $timestamp); |
715 | 715 | }, |
@@ -266,7 +266,7 @@ |
||
266 | 266 | * |
267 | 267 | * @return bool |
268 | 268 | */ |
269 | - public function isSet($key) |
|
269 | + public function isset($key) |
|
270 | 270 | { |
271 | 271 | return $this->__isset($key); |
272 | 272 | } |
@@ -89,7 +89,7 @@ |
||
89 | 89 | static fn(string $sessionId): string => $handler->read($sessionId), |
90 | 90 | static fn(string $sessionId, string $data): bool => $handler->write($sessionId, $data), |
91 | 91 | static fn(string $sessionId): bool => $handler->destroy($sessionId), |
92 | - static fn(int $maxLifetime): int|bool => $handler->gc($maxLifetime) |
|
92 | + static fn(int $maxLifetime): int | bool => $handler->gc($maxLifetime) |
|
93 | 93 | ); |
94 | 94 | |
95 | 95 | /* |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | 'name' => $board_info['cat']['name'] |
447 | 447 | ) |
448 | 448 | ), |
449 | - array_reverse($board_info['parent_boards']), [ |
|
449 | + array_reverse($board_info['parent_boards']), [ |
|
450 | 450 | [ |
451 | 451 | 'url' => getUrl('board', ['board' => $board, 'start' => '0', 'name' => $board_info['name']]), |
452 | 452 | 'name' => $board_info['name'] |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | 'spider_group' => !empty($modSettings['spider_group']) && $modSettings['spider_group'] != 1 ? $modSettings['spider_group'] : 0, |
596 | 596 | ] |
597 | 597 | )->fetch_callback( |
598 | - static function ($row) use (&$removals, &$permissions) { |
|
598 | + static function($row) use (&$removals, &$permissions) { |
|
599 | 599 | if (empty($row['add_deny'])) |
600 | 600 | { |
601 | 601 | $removals[] = $row['permission']; |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | 'spider_group' => !empty($modSettings['spider_group']) && $modSettings['spider_group'] != 1 ? $modSettings['spider_group'] : 0, |
636 | 636 | ) |
637 | 637 | )->fetch_callback( |
638 | - static function ($row) use (&$removals, &$permissions) { |
|
638 | + static function($row) use (&$removals, &$permissions) { |
|
639 | 639 | if (empty($row['add_deny'])) |
640 | 640 | { |
641 | 641 | $removals[] = $row['permission']; |
@@ -83,7 +83,7 @@ |
||
83 | 83 | 'attachment_type' => 0, |
84 | 84 | ) |
85 | 85 | )->fetch_callback( |
86 | - static function ($row) use ($includeUnapproved, $filter, $all_posters, &$attachments, &$temp) { |
|
86 | + static function($row) use ($includeUnapproved, $filter, $all_posters, &$attachments, &$temp) { |
|
87 | 87 | if (!$row['approved'] && !$includeUnapproved |
88 | 88 | && (empty($filter) || !call_user_func($filter, $row, $all_posters))) |
89 | 89 | { |
@@ -225,9 +225,11 @@ |
||
225 | 225 | if (empty($attachment['id_thumb']) |
226 | 226 | || $attachment['thumb_width'] > $modSettings['attachmentThumbWidth'] |
227 | 227 | || $attachment['thumb_height'] > $modSettings['attachmentThumbHeight']) |
228 | - //|| ($attachment['thumb_width'] < $modSettings['attachmentThumbWidth'] && $attachment['thumb_height'] < $modSettings['attachmentThumbHeight'])) |
|
228 | + { |
|
229 | + //|| ($attachment['thumb_width'] < $modSettings['attachmentThumbWidth'] && $attachment['thumb_height'] < $modSettings['attachmentThumbHeight'])) |
|
229 | 230 | { |
230 | 231 | $filename = getAttachmentFilename($attachment['filename'], $attachment['id_attach'], $attachment['id_folder'], false, $attachment['file_hash']); |
232 | + } |
|
231 | 233 | $attachment = array_merge($attachment, updateAttachmentThumbnail($filename, $attachment['id_attach'], $id_msg, $attachment['id_thumb'], $attachment['filename'])); |
232 | 234 | } |
233 | 235 |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | 'num_recent' => $num_recent, |
498 | 498 | ) |
499 | 499 | )->fetch_callback( |
500 | - static function ($row) use (&$topics) { |
|
500 | + static function($row) use (&$topics) { |
|
501 | 501 | $topics[$row['id_topic']] = $row; |
502 | 502 | } |
503 | 503 | ); |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | 'topic_list' => $topic_list |
529 | 529 | ) |
530 | 530 | )->fetch_callback( |
531 | - static function ($row) use (&$topics) { |
|
531 | + static function($row) use (&$topics) { |
|
532 | 532 | $topics[$row['id_topic']] += $row; |
533 | 533 | } |
534 | 534 | ); |
@@ -1285,7 +1285,7 @@ discard block |
||
1285 | 1285 | 'current_poll' => $row['id_poll'], |
1286 | 1286 | ) |
1287 | 1287 | )->fetch_callback( |
1288 | - static function ($rowChoice) use (&$options) { |
|
1288 | + static function($rowChoice) use (&$options) { |
|
1289 | 1289 | $rowChoice['label'] = censor($rowChoice['label']); |
1290 | 1290 | $options[$rowChoice['id_choice']] = array($rowChoice['label'], $rowChoice['votes']); |
1291 | 1291 | } |
@@ -2100,7 +2100,7 @@ discard block |
||
2100 | 2100 | 'is_approved' => 1, |
2101 | 2101 | ) |
2102 | 2102 | )->fetch_callback( |
2103 | - static function ($row) use (&$attachments, $scripturl, $modSettings) { |
|
2103 | + static function($row) use (&$attachments, $scripturl, $modSettings) { |
|
2104 | 2104 | // We have something. |
2105 | 2105 | $filename = preg_replace('~&#(\\d{1,7}|x[0-9a-fA-F]{1,6});~', '&#\\1;', htmlspecialchars($row['filename'], ENT_COMPAT, 'UTF-8')); |
2106 | 2106 |