@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | require_once($sourcedir . '/Security.php'); |
79 | 79 | |
80 | 80 | // If $maintenance is set specifically to 2, then we're upgrading or something. |
81 | -if (!empty($maintenance) && 2 === $maintenance) |
|
81 | +if (!empty($maintenance) && 2 === $maintenance) |
|
82 | 82 | { |
83 | 83 | display_maintenance_message(); |
84 | 84 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | * |
95 | 95 | * @param string $class The fully-qualified class name. |
96 | 96 | */ |
97 | -spl_autoload_register(function ($class) use ($sourcedir) |
|
97 | +spl_autoload_register(function($class) use ($sourcedir) |
|
98 | 98 | { |
99 | 99 | $classMap = array( |
100 | 100 | 'ReCaptcha\\' => 'ReCaptcha/', |
@@ -683,7 +683,7 @@ |
||
683 | 683 | foreach ($columns as $columnName => $type) |
684 | 684 | { |
685 | 685 | //check pk fiel |
686 | - IF (in_array($columnName, $keys)) |
|
686 | + if (in_array($columnName, $keys)) |
|
687 | 687 | { |
688 | 688 | $key_str .= ($count_pk > 0 ? ',' : ''); |
689 | 689 | $key_str .= $columnName; |
@@ -64,8 +64,7 @@ discard block |
||
64 | 64 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
65 | 65 | && isset($_REQUEST['ajax']) |
66 | 66 | ) |
67 | - ) |
|
68 | - { |
|
67 | + ) { |
|
69 | 68 | $context['from_ajax'] = true; |
70 | 69 | $context['template_layers'] = array(); |
71 | 70 | } |
@@ -137,8 +136,7 @@ discard block |
||
137 | 136 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
138 | 137 | && isset($_REQUEST['ajax']) |
139 | 138 | ) |
140 | - ) |
|
141 | - { |
|
139 | + ) { |
|
142 | 140 | $context['from_ajax'] = true; |
143 | 141 | $context['template_layers'] = array(); |
144 | 142 | } |
@@ -517,8 +515,7 @@ discard block |
||
517 | 515 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
518 | 516 | && isset($_REQUEST['ajax']) |
519 | 517 | ) |
520 | - ) |
|
521 | - { |
|
518 | + ) { |
|
522 | 519 | $context['from_ajax'] = true; |
523 | 520 | $context['template_layers'] = array(); |
524 | 521 | } |
@@ -1456,7 +1456,6 @@ |
||
1456 | 1456 | * |
1457 | 1457 | * @param string $url The url/domain/host we are attempting to vaalidate for the base domain. |
1458 | 1458 | * @param bool $sub_domain (Default: false): When true it will lowest level of a domain off before performing any other logic. |
1459 | - |
|
1460 | 1459 | * @since 2.1 |
1461 | 1460 | */ |
1462 | 1461 | function FindCorsBaseUrl($url, $sub_domain = false) |
@@ -340,7 +340,7 @@ |
||
340 | 340 | WHERE t.id_board = {int:current_board} ' |
341 | 341 | . (!$modSettings['postmod_active'] || $context['can_approve_posts'] ? '' : ' |
342 | 342 | AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') . (!empty($message_index_topic_wheres) ? ' |
343 | - AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : ''). ' |
|
343 | + AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : '') . ' |
|
344 | 344 | ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . ' |
345 | 345 | LIMIT {int:maxindex} |
346 | 346 | OFFSET {int:start} '; |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | { |
379 | 379 | $val = 'CASE '; |
380 | 380 | foreach ($members as $k => $v) |
381 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
381 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
382 | 382 | |
383 | 383 | $val = $val . ' END'; |
384 | 384 | $type = 'raw'; |
@@ -1041,11 +1041,11 @@ discard block |
||
1041 | 1041 | // Anything that isn't a specification, punctuation mark, or whitespace. |
1042 | 1042 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
1043 | 1043 | // A series of punctuation marks (except %), possibly separated by whitespace. |
1044 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1044 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1045 | 1045 | // Unwanted trailing punctuation and whitespace. |
1046 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1046 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1047 | 1047 | // Unwanted opening punctuation and whitespace. |
1048 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1048 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1049 | 1049 | ), |
1050 | 1050 | array( |
1051 | 1051 | '', |
@@ -1443,7 +1443,7 @@ discard block |
||
1443 | 1443 | $returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img"></a>'; |
1444 | 1444 | else |
1445 | 1445 | { |
1446 | - $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': ''; |
|
1446 | + $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
|
1447 | 1447 | $height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : ''; |
1448 | 1448 | $returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>'; |
1449 | 1449 | } |
@@ -1454,7 +1454,7 @@ discard block |
||
1454 | 1454 | $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
1455 | 1455 | $height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : ''; |
1456 | 1456 | |
1457 | - $returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="'. $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
1457 | + $returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="' . $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
1458 | 1458 | } |
1459 | 1459 | // Audio. |
1460 | 1460 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1462,7 +1462,7 @@ discard block |
||
1462 | 1462 | $width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;'; |
1463 | 1463 | $height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : ''; |
1464 | 1464 | |
1465 | - $returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="'. $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>'; |
|
1465 | + $returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="' . $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>'; |
|
1466 | 1466 | } |
1467 | 1467 | // Anything else. |
1468 | 1468 | else |
@@ -1631,7 +1631,7 @@ discard block |
||
1631 | 1631 | 'type' => 'unparsed_commas_content', |
1632 | 1632 | 'test' => '\d+,\d+\]', |
1633 | 1633 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1634 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1634 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1635 | 1635 | { |
1636 | 1636 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
1637 | 1637 | if (empty($scheme)) |
@@ -1744,8 +1744,8 @@ discard block |
||
1744 | 1744 | else |
1745 | 1745 | $url = get_proxied_url($url); |
1746 | 1746 | |
1747 | - $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ''; |
|
1748 | - $title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : ''; |
|
1747 | + $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ''; |
|
1748 | + $title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : ''; |
|
1749 | 1749 | |
1750 | 1750 | $data = isset($disabled[$tag['tag']]) ? $url : '<img src="' . $url . '"' . $alt . $title . $params['{width}'] . $params['{height}'] . 'class="bbc_img' . (!empty($params['{width}']) || !empty($params['{height}']) ? ' resized' : '') . '" loading="lazy">'; |
1751 | 1751 | }, |
@@ -2159,12 +2159,12 @@ discard block |
||
2159 | 2159 | $codes[] = array( |
2160 | 2160 | 'tag' => 'cowsay', |
2161 | 2161 | 'parameters' => array( |
2162 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2162 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2163 | 2163 | { |
2164 | 2164 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2165 | 2165 | }, |
2166 | 2166 | ), |
2167 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2167 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2168 | 2168 | { |
2169 | 2169 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2170 | 2170 | }, |
@@ -3814,7 +3814,7 @@ discard block |
||
3814 | 3814 | if ($fp != false) |
3815 | 3815 | { |
3816 | 3816 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
3817 | - fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: '. SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n"); |
|
3817 | + fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: ' . SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n"); |
|
3818 | 3818 | |
3819 | 3819 | // Read in the HTTP/1.1 or whatever. |
3820 | 3820 | $test = substr(fgets($fp, 11), -1); |
@@ -4431,7 +4431,7 @@ discard block |
||
4431 | 4431 | $toMinify = array(); |
4432 | 4432 | $normal = array(); |
4433 | 4433 | |
4434 | - uasort($context['css_files'], function ($a, $b) |
|
4434 | + uasort($context['css_files'], function($a, $b) |
|
4435 | 4435 | { |
4436 | 4436 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4437 | 4437 | }); |
@@ -5728,7 +5728,7 @@ discard block |
||
5728 | 5728 | { |
5729 | 5729 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
5730 | 5730 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5731 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5731 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5732 | 5732 | if ($keep_alive) |
5733 | 5733 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
5734 | 5734 | else |
@@ -5738,7 +5738,7 @@ discard block |
||
5738 | 5738 | { |
5739 | 5739 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
5740 | 5740 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5741 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5741 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5742 | 5742 | if ($keep_alive) |
5743 | 5743 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
5744 | 5744 | else |
@@ -5987,13 +5987,13 @@ discard block |
||
5987 | 5987 | |
5988 | 5988 | // UTF-8 occurences of MS special characters |
5989 | 5989 | $findchars_utf8 = array( |
5990 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
5991 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
5992 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
5993 | - "\xe2\x80\x98", // left single curly quote |
|
5994 | - "\xe2\x80\x99", // right single curly quote |
|
5995 | - "\xe2\x80\x9c", // left double curly quote |
|
5996 | - "\xe2\x80\x9d", // right double curly quote |
|
5990 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
5991 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
5992 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
5993 | + "\xe2\x80\x98", // left single curly quote |
|
5994 | + "\xe2\x80\x99", // right single curly quote |
|
5995 | + "\xe2\x80\x9c", // left double curly quote |
|
5996 | + "\xe2\x80\x9d", // right double curly quote |
|
5997 | 5997 | ); |
5998 | 5998 | |
5999 | 5999 | // windows 1252 / iso equivalents |
@@ -6009,13 +6009,13 @@ discard block |
||
6009 | 6009 | |
6010 | 6010 | // safe replacements |
6011 | 6011 | $replacechars = array( |
6012 | - ',', // ‚ |
|
6013 | - ',,', // „ |
|
6014 | - '...', // … |
|
6015 | - "'", // ‘ |
|
6016 | - "'", // ’ |
|
6017 | - '"', // “ |
|
6018 | - '"', // ” |
|
6012 | + ',', // ‚ |
|
6013 | + ',,', // „ |
|
6014 | + '...', // … |
|
6015 | + "'", // ‘ |
|
6016 | + "'", // ’ |
|
6017 | + '"', // “ |
|
6018 | + '"', // ” |
|
6019 | 6019 | ); |
6020 | 6020 | |
6021 | 6021 | if ($context['utf8']) |
@@ -6360,7 +6360,7 @@ discard block |
||
6360 | 6360 | $desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : ''); |
6361 | 6361 | |
6362 | 6362 | // We don't want abbreviations like '+03' or '-11'. |
6363 | - $abbrs = array_filter($tzvalue['abbrs'], function ($abbr) { |
|
6363 | + $abbrs = array_filter($tzvalue['abbrs'], function($abbr) { |
|
6364 | 6364 | return !strspn($abbr, '+-'); |
6365 | 6365 | }); |
6366 | 6366 | $abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array(); |
@@ -7324,7 +7324,7 @@ discard block |
||
7324 | 7324 | EXISTS ( |
7325 | 7325 | SELECT bpv.id_board |
7326 | 7326 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7327 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
7327 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7328 | 7328 | AND bpv.deny = 0 |
7329 | 7329 | AND bpv.id_board = b.id_board |
7330 | 7330 | )'; |
@@ -7334,7 +7334,7 @@ discard block |
||
7334 | 7334 | AND NOT EXISTS ( |
7335 | 7335 | SELECT bpv.id_board |
7336 | 7336 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7337 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
7337 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7338 | 7338 | AND bpv.deny = 1 |
7339 | 7339 | AND bpv.id_board = b.id_board |
7340 | 7340 | )'; |
@@ -7639,8 +7639,8 @@ discard block |
||
7639 | 7639 | $i = 0; |
7640 | 7640 | while (empty($done)) |
7641 | 7641 | { |
7642 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
7643 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
7642 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
7643 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
7644 | 7644 | else |
7645 | 7645 | $done = true; |
7646 | 7646 | } |
@@ -7650,8 +7650,8 @@ discard block |
||
7650 | 7650 | $i = 0; |
7651 | 7651 | while (empty($done)) |
7652 | 7652 | { |
7653 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
7654 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
7653 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
7654 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
7655 | 7655 | else |
7656 | 7656 | $done = true; |
7657 | 7657 | } |
@@ -280,7 +280,6 @@ discard block |
||
280 | 280 | $condition = 'id_member IN ({array_int:members})'; |
281 | 281 | $parameters['members'] = $members; |
282 | 282 | } |
283 | - |
|
284 | 283 | elseif ($members === null) |
285 | 284 | $condition = '1=1'; |
286 | 285 | |
@@ -383,11 +382,9 @@ discard block |
||
383 | 382 | $val = $val . ' END'; |
384 | 383 | $type = 'raw'; |
385 | 384 | } |
386 | - |
|
387 | 385 | else |
388 | 386 | $val = alert_count($members, true); |
389 | 387 | } |
390 | - |
|
391 | 388 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
392 | 389 | { |
393 | 390 | $val = $var . ' ' . $val . ' 1'; |
@@ -2160,12 +2157,12 @@ discard block |
||
2160 | 2157 | 'tag' => 'cowsay', |
2161 | 2158 | 'parameters' => array( |
2162 | 2159 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2163 | - { |
|
2160 | + { |
|
2164 | 2161 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2165 | 2162 | }, |
2166 | 2163 | ), |
2167 | 2164 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2168 | - { |
|
2165 | + { |
|
2169 | 2166 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2170 | 2167 | }, |
2171 | 2168 | ), |
@@ -2494,7 +2491,8 @@ discard block |
||
2494 | 2491 | |
2495 | 2492 | foreach (array('path', 'query', 'fragment') as $part) |
2496 | 2493 | { |
2497 | - switch ($part) { |
|
2494 | + switch ($part) |
|
2495 | + { |
|
2498 | 2496 | case 'path': |
2499 | 2497 | $part_disallowed_chars = '<>' . $bracket_quote_chars . $space_chars . $excluded_trailing_chars . '/#&'; |
2500 | 2498 | $part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars); |
@@ -3541,7 +3539,7 @@ discard block |
||
3541 | 3539 | |
3542 | 3540 | // Replace away! |
3543 | 3541 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
3544 | - { |
|
3542 | + { |
|
3545 | 3543 | return $smileyPregReplacements[$matches[1]]; |
3546 | 3544 | }, $message); |
3547 | 3545 | } |
@@ -4352,7 +4350,6 @@ discard block |
||
4352 | 4350 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4353 | 4351 | $minSeed = $js_file['options']['seed']; |
4354 | 4352 | } |
4355 | - |
|
4356 | 4353 | else |
4357 | 4354 | { |
4358 | 4355 | echo ' |
@@ -6275,7 +6272,8 @@ discard block |
||
6275 | 6272 | $zones[$tzkey]['tzid'] = $tzid; |
6276 | 6273 | $zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0); |
6277 | 6274 | |
6278 | - foreach ($tzinfo as $transition) { |
|
6275 | + foreach ($tzinfo as $transition) |
|
6276 | + { |
|
6279 | 6277 | $zones[$tzkey]['abbrs'][] = $transition['abbr']; |
6280 | 6278 | } |
6281 | 6279 | |
@@ -6360,7 +6358,8 @@ discard block |
||
6360 | 6358 | $desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : ''); |
6361 | 6359 | |
6362 | 6360 | // We don't want abbreviations like '+03' or '-11'. |
6363 | - $abbrs = array_filter($tzvalue['abbrs'], function ($abbr) { |
|
6361 | + $abbrs = array_filter($tzvalue['abbrs'], function ($abbr) |
|
6362 | + { |
|
6364 | 6363 | return !strspn($abbr, '+-'); |
6365 | 6364 | }); |
6366 | 6365 | $abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array(); |
@@ -6761,7 +6760,6 @@ discard block |
||
6761 | 6760 | $isWritable = true; |
6762 | 6761 | break; |
6763 | 6762 | } |
6764 | - |
|
6765 | 6763 | else |
6766 | 6764 | @chmod($file, $val); |
6767 | 6765 | } |
@@ -1232,7 +1232,8 @@ discard block |
||
1232 | 1232 | } |
1233 | 1233 | |
1234 | 1234 | // It's important to do the numbered ones before the named ones, or messes happen. |
1235 | - uksort($substitutions, function($a, $b) { |
|
1235 | + uksort($substitutions, function($a, $b) |
|
1236 | + { |
|
1236 | 1237 | if (is_int($a) && is_int($b)) |
1237 | 1238 | return $a > $b ? 1 : ($a < $b ? -1 : 0); |
1238 | 1239 | elseif (is_int($a)) |
@@ -1771,8 +1772,12 @@ discard block |
||
1771 | 1772 | unset($mtime, $settingsFile, $settingsText); |
1772 | 1773 | $defined_vars = get_defined_vars(); |
1773 | 1774 | } |
1774 | - catch (Throwable $e) {} |
|
1775 | - catch (ErrorException $e) {} |
|
1775 | + catch (Throwable $e) |
|
1776 | + { |
|
1777 | +} |
|
1778 | + catch (ErrorException $e) |
|
1779 | + { |
|
1780 | +} |
|
1776 | 1781 | if (isset($e)) |
1777 | 1782 | return false; |
1778 | 1783 | |
@@ -1928,7 +1933,8 @@ discard block |
||
1928 | 1933 | // For the same reason, replace literal returns and newlines with "\r" and "\n" |
1929 | 1934 | elseif (is_string($var) && (strpos($var, "\n") !== false || strpos($var, "\r") !== false)) |
1930 | 1935 | { |
1931 | - return strtr(preg_replace_callback('/[\r\n]+/', function($m) { |
|
1936 | + return strtr(preg_replace_callback('/[\r\n]+/', function($m) |
|
1937 | + { |
|
1932 | 1938 | return '\' . "' . strtr($m[0], array("\r" => '\r', "\n" => '\n')) . '" . \''; |
1933 | 1939 | }, var_export($var, true)), array("'' . " => '', " . ''" => '')); |
1934 | 1940 | } |
@@ -370,7 +370,7 @@ |
||
370 | 370 | { |
371 | 371 | if (!empty($exif_data['Orientation'])) |
372 | 372 | { |
373 | - switch($exif_data['Orientation']) |
|
373 | + switch ($exif_data['Orientation']) |
|
374 | 374 | { |
375 | 375 | case 8: |
376 | 376 | $rotate = 90; |