@@ -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'; |
@@ -1045,11 +1045,11 @@ discard block |
||
1045 | 1045 | // Anything that isn't a specification, punctuation mark, or whitespace. |
1046 | 1046 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
1047 | 1047 | // A series of punctuation marks (except %), possibly separated by whitespace. |
1048 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1048 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1049 | 1049 | // Unwanted trailing punctuation and whitespace. |
1050 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1050 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1051 | 1051 | // Unwanted opening punctuation and whitespace. |
1052 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1052 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1053 | 1053 | ), |
1054 | 1054 | array( |
1055 | 1055 | '', |
@@ -1447,7 +1447,7 @@ discard block |
||
1447 | 1447 | $returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img">'; |
1448 | 1448 | else |
1449 | 1449 | { |
1450 | - $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': ''; |
|
1450 | + $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
|
1451 | 1451 | $height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : ''; |
1452 | 1452 | $returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>'; |
1453 | 1453 | } |
@@ -1458,7 +1458,7 @@ discard block |
||
1458 | 1458 | $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
1459 | 1459 | $height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : ''; |
1460 | 1460 | |
1461 | - $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>' : ''); |
|
1461 | + $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>' : ''); |
|
1462 | 1462 | } |
1463 | 1463 | // Audio. |
1464 | 1464 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1466,7 +1466,7 @@ discard block |
||
1466 | 1466 | $width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;'; |
1467 | 1467 | $height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : ''; |
1468 | 1468 | |
1469 | - $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>'; |
|
1469 | + $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>'; |
|
1470 | 1470 | } |
1471 | 1471 | // Anything else. |
1472 | 1472 | else |
@@ -1635,7 +1635,7 @@ discard block |
||
1635 | 1635 | 'type' => 'unparsed_commas_content', |
1636 | 1636 | 'test' => '\d+,\d+\]', |
1637 | 1637 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1638 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1638 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1639 | 1639 | { |
1640 | 1640 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
1641 | 1641 | if (empty($scheme)) |
@@ -1748,8 +1748,8 @@ discard block |
||
1748 | 1748 | else |
1749 | 1749 | $url = get_proxied_url($url); |
1750 | 1750 | |
1751 | - $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ' alt=""'; |
|
1752 | - $title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : ''; |
|
1751 | + $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ' alt=""'; |
|
1752 | + $title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : ''; |
|
1753 | 1753 | |
1754 | 1754 | $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">'; |
1755 | 1755 | }, |
@@ -2166,12 +2166,12 @@ discard block |
||
2166 | 2166 | $codes[] = array( |
2167 | 2167 | 'tag' => 'cowsay', |
2168 | 2168 | 'parameters' => array( |
2169 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2169 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2170 | 2170 | { |
2171 | 2171 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2172 | 2172 | }, |
2173 | 2173 | ), |
2174 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2174 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2175 | 2175 | { |
2176 | 2176 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2177 | 2177 | }, |
@@ -3843,7 +3843,7 @@ discard block |
||
3843 | 3843 | if ($fp != false) |
3844 | 3844 | { |
3845 | 3845 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
3846 | - 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"); |
|
3846 | + 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"); |
|
3847 | 3847 | |
3848 | 3848 | // Read in the HTTP/1.1 or whatever. |
3849 | 3849 | $test = substr(fgets($fp, 11), -1); |
@@ -4459,7 +4459,7 @@ discard block |
||
4459 | 4459 | |
4460 | 4460 | uasort( |
4461 | 4461 | $context['css_files'], |
4462 | - function ($a, $b) |
|
4462 | + function($a, $b) |
|
4463 | 4463 | { |
4464 | 4464 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4465 | 4465 | } |
@@ -5761,7 +5761,7 @@ discard block |
||
5761 | 5761 | { |
5762 | 5762 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
5763 | 5763 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5764 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5764 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5765 | 5765 | if ($keep_alive) |
5766 | 5766 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
5767 | 5767 | else |
@@ -5771,7 +5771,7 @@ discard block |
||
5771 | 5771 | { |
5772 | 5772 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
5773 | 5773 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5774 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5774 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5775 | 5775 | if ($keep_alive) |
5776 | 5776 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
5777 | 5777 | else |
@@ -6020,13 +6020,13 @@ discard block |
||
6020 | 6020 | |
6021 | 6021 | // UTF-8 occurences of MS special characters |
6022 | 6022 | $findchars_utf8 = array( |
6023 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
6024 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
6025 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
6026 | - "\xe2\x80\x98", // left single curly quote |
|
6027 | - "\xe2\x80\x99", // right single curly quote |
|
6028 | - "\xe2\x80\x9c", // left double curly quote |
|
6029 | - "\xe2\x80\x9d", // right double curly quote |
|
6023 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
6024 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
6025 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
6026 | + "\xe2\x80\x98", // left single curly quote |
|
6027 | + "\xe2\x80\x99", // right single curly quote |
|
6028 | + "\xe2\x80\x9c", // left double curly quote |
|
6029 | + "\xe2\x80\x9d", // right double curly quote |
|
6030 | 6030 | ); |
6031 | 6031 | |
6032 | 6032 | // windows 1252 / iso equivalents |
@@ -6042,13 +6042,13 @@ discard block |
||
6042 | 6042 | |
6043 | 6043 | // safe replacements |
6044 | 6044 | $replacechars = array( |
6045 | - ',', // ‚ |
|
6046 | - ',,', // „ |
|
6047 | - '...', // … |
|
6048 | - "'", // ‘ |
|
6049 | - "'", // ’ |
|
6050 | - '"', // “ |
|
6051 | - '"', // ” |
|
6045 | + ',', // ‚ |
|
6046 | + ',,', // „ |
|
6047 | + '...', // … |
|
6048 | + "'", // ‘ |
|
6049 | + "'", // ’ |
|
6050 | + '"', // “ |
|
6051 | + '"', // ” |
|
6052 | 6052 | ); |
6053 | 6053 | |
6054 | 6054 | if ($context['utf8']) |
@@ -6409,7 +6409,7 @@ discard block |
||
6409 | 6409 | // We don't want abbreviations like '+03' or '-11'. |
6410 | 6410 | $abbrs = array_filter( |
6411 | 6411 | $tzvalue['abbrs'], |
6412 | - function ($abbr) |
|
6412 | + function($abbr) |
|
6413 | 6413 | { |
6414 | 6414 | return !strspn($abbr, '+-'); |
6415 | 6415 | } |
@@ -7384,7 +7384,7 @@ discard block |
||
7384 | 7384 | EXISTS ( |
7385 | 7385 | SELECT bpv.id_board |
7386 | 7386 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7387 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
7387 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7388 | 7388 | AND bpv.deny = 0 |
7389 | 7389 | AND bpv.id_board = b.id_board |
7390 | 7390 | )'; |
@@ -7394,7 +7394,7 @@ discard block |
||
7394 | 7394 | AND NOT EXISTS ( |
7395 | 7395 | SELECT bpv.id_board |
7396 | 7396 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7397 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
7397 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7398 | 7398 | AND bpv.deny = 1 |
7399 | 7399 | AND bpv.id_board = b.id_board |
7400 | 7400 | )'; |
@@ -7703,8 +7703,8 @@ discard block |
||
7703 | 7703 | $i = 0; |
7704 | 7704 | while (empty($done)) |
7705 | 7705 | { |
7706 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
7707 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
7706 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
7707 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
7708 | 7708 | else |
7709 | 7709 | $done = true; |
7710 | 7710 | } |
@@ -7714,8 +7714,8 @@ discard block |
||
7714 | 7714 | $i = 0; |
7715 | 7715 | while (empty($done)) |
7716 | 7716 | { |
7717 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
7718 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
7717 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
7718 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
7719 | 7719 | else |
7720 | 7720 | $done = true; |
7721 | 7721 | } |