@@ -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'; |
@@ -868,11 +868,11 @@ discard block |
||
868 | 868 | // Anything that isn't a specification, punctuation mark, or whitespace. |
869 | 869 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
870 | 870 | // A series of punctuation marks (except %), possibly separated by whitespace. |
871 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
871 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
872 | 872 | // Unwanted trailing punctuation and whitespace. |
873 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
873 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
874 | 874 | // Unwanted opening punctuation and whitespace. |
875 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
875 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
876 | 876 | ), |
877 | 877 | array( |
878 | 878 | '', |
@@ -1175,7 +1175,7 @@ discard block |
||
1175 | 1175 | { |
1176 | 1176 | $dates[$tzid . '_' . $timestamp]['results'][$format] = preg_replace_callback( |
1177 | 1177 | '/\xEE\x84\xA0([\d_]+)(\xEE\x84(?:[\xA1-\xAF]))/', |
1178 | - function ($matches) |
|
1178 | + function($matches) |
|
1179 | 1179 | { |
1180 | 1180 | switch ($matches[2]) |
1181 | 1181 | { |
@@ -1309,7 +1309,7 @@ discard block |
||
1309 | 1309 | elseif (!empty($context['character_set']) && is_callable('mb_decode_numericentity')) |
1310 | 1310 | { |
1311 | 1311 | // Get whatever the default replacement character is for this encoding. |
1312 | - $substitute = mb_decode_numericentity('�', array(0xFFFD,0xFFFD,0,0xFFFF), $context['character_set']); |
|
1312 | + $substitute = mb_decode_numericentity('�', array(0xFFFD, 0xFFFD, 0, 0xFFFF), $context['character_set']); |
|
1313 | 1313 | } |
1314 | 1314 | else |
1315 | 1315 | $substitute = '?'; |
@@ -1794,7 +1794,7 @@ discard block |
||
1794 | 1794 | $returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img">'; |
1795 | 1795 | else |
1796 | 1796 | { |
1797 | - $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': ''; |
|
1797 | + $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
|
1798 | 1798 | $height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : ''; |
1799 | 1799 | $returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>'; |
1800 | 1800 | } |
@@ -1805,7 +1805,7 @@ discard block |
||
1805 | 1805 | $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
1806 | 1806 | $height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : ''; |
1807 | 1807 | |
1808 | - $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>' : ''); |
|
1808 | + $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>' : ''); |
|
1809 | 1809 | } |
1810 | 1810 | // Audio. |
1811 | 1811 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1813,7 +1813,7 @@ discard block |
||
1813 | 1813 | $width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;'; |
1814 | 1814 | $height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : ''; |
1815 | 1815 | |
1816 | - $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>'; |
|
1816 | + $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>'; |
|
1817 | 1817 | } |
1818 | 1818 | // Anything else. |
1819 | 1819 | else |
@@ -1982,7 +1982,7 @@ discard block |
||
1982 | 1982 | 'type' => 'unparsed_commas_content', |
1983 | 1983 | 'test' => '\d+,\d+\]', |
1984 | 1984 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1985 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1985 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1986 | 1986 | { |
1987 | 1987 | $data[0] = normalize_iri($data[0]); |
1988 | 1988 | |
@@ -2108,8 +2108,8 @@ discard block |
||
2108 | 2108 | else |
2109 | 2109 | $url = get_proxied_url($url); |
2110 | 2110 | |
2111 | - $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ' alt=""'; |
|
2112 | - $title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : ''; |
|
2111 | + $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ' alt=""'; |
|
2112 | + $title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : ''; |
|
2113 | 2113 | |
2114 | 2114 | $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">'; |
2115 | 2115 | }, |
@@ -2540,12 +2540,12 @@ discard block |
||
2540 | 2540 | $codes[] = array( |
2541 | 2541 | 'tag' => 'cowsay', |
2542 | 2542 | 'parameters' => array( |
2543 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2543 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2544 | 2544 | { |
2545 | 2545 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2546 | 2546 | }, |
2547 | 2547 | ), |
2548 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2548 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2549 | 2549 | { |
2550 | 2550 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2551 | 2551 | }, |
@@ -4250,7 +4250,7 @@ discard block |
||
4250 | 4250 | if ($fp != false) |
4251 | 4251 | { |
4252 | 4252 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
4253 | - 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"); |
|
4253 | + 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"); |
|
4254 | 4254 | |
4255 | 4255 | // Read in the HTTP/1.1 or whatever. |
4256 | 4256 | $test = substr(fgets($fp, 11), -1); |
@@ -4846,7 +4846,7 @@ discard block |
||
4846 | 4846 | |
4847 | 4847 | uasort( |
4848 | 4848 | $context['css_files'], |
4849 | - function ($a, $b) |
|
4849 | + function($a, $b) |
|
4850 | 4850 | { |
4851 | 4851 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4852 | 4852 | } |
@@ -6143,7 +6143,7 @@ discard block |
||
6143 | 6143 | { |
6144 | 6144 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
6145 | 6145 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6146 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6146 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6147 | 6147 | if ($keep_alive) |
6148 | 6148 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
6149 | 6149 | else |
@@ -6153,7 +6153,7 @@ discard block |
||
6153 | 6153 | { |
6154 | 6154 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
6155 | 6155 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6156 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6156 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6157 | 6157 | if ($keep_alive) |
6158 | 6158 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
6159 | 6159 | else |
@@ -6402,13 +6402,13 @@ discard block |
||
6402 | 6402 | |
6403 | 6403 | // UTF-8 occurences of MS special characters |
6404 | 6404 | $findchars_utf8 = array( |
6405 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
6406 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
6407 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
6408 | - "\xe2\x80\x98", // left single curly quote |
|
6409 | - "\xe2\x80\x99", // right single curly quote |
|
6410 | - "\xe2\x80\x9c", // left double curly quote |
|
6411 | - "\xe2\x80\x9d", // right double curly quote |
|
6405 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
6406 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
6407 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
6408 | + "\xe2\x80\x98", // left single curly quote |
|
6409 | + "\xe2\x80\x99", // right single curly quote |
|
6410 | + "\xe2\x80\x9c", // left double curly quote |
|
6411 | + "\xe2\x80\x9d", // right double curly quote |
|
6412 | 6412 | ); |
6413 | 6413 | |
6414 | 6414 | // windows 1252 / iso equivalents |
@@ -6424,13 +6424,13 @@ discard block |
||
6424 | 6424 | |
6425 | 6425 | // safe replacements |
6426 | 6426 | $replacechars = array( |
6427 | - ',', // ‚ |
|
6428 | - ',,', // „ |
|
6429 | - '...', // … |
|
6430 | - "'", // ‘ |
|
6431 | - "'", // ’ |
|
6432 | - '"', // “ |
|
6433 | - '"', // ” |
|
6427 | + ',', // ‚ |
|
6428 | + ',,', // „ |
|
6429 | + '...', // … |
|
6430 | + "'", // ‘ |
|
6431 | + "'", // ’ |
|
6432 | + '"', // “ |
|
6433 | + '"', // ” |
|
6434 | 6434 | ); |
6435 | 6435 | |
6436 | 6436 | if ($context['utf8']) |
@@ -6791,7 +6791,7 @@ discard block |
||
6791 | 6791 | // We don't want abbreviations like '+03' or '-11'. |
6792 | 6792 | $abbrs = array_filter( |
6793 | 6793 | $tzvalue['abbrs'], |
6794 | - function ($abbr) |
|
6794 | + function($abbr) |
|
6795 | 6795 | { |
6796 | 6796 | return !strspn($abbr, '+-'); |
6797 | 6797 | } |
@@ -7780,7 +7780,7 @@ discard block |
||
7780 | 7780 | EXISTS ( |
7781 | 7781 | SELECT bpv.id_board |
7782 | 7782 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7783 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
7783 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7784 | 7784 | AND bpv.deny = 0 |
7785 | 7785 | AND bpv.id_board = b.id_board |
7786 | 7786 | )'; |
@@ -7790,7 +7790,7 @@ discard block |
||
7790 | 7790 | AND NOT EXISTS ( |
7791 | 7791 | SELECT bpv.id_board |
7792 | 7792 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7793 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
7793 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7794 | 7794 | AND bpv.deny = 1 |
7795 | 7795 | AND bpv.id_board = b.id_board |
7796 | 7796 | )'; |
@@ -8197,8 +8197,8 @@ discard block |
||
8197 | 8197 | $i = 0; |
8198 | 8198 | while (empty($done)) |
8199 | 8199 | { |
8200 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
8201 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
8200 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
8201 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
8202 | 8202 | else |
8203 | 8203 | $done = true; |
8204 | 8204 | } |
@@ -8208,8 +8208,8 @@ discard block |
||
8208 | 8208 | $i = 0; |
8209 | 8209 | while (empty($done)) |
8210 | 8210 | { |
8211 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
8212 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
8211 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
8212 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
8213 | 8213 | else |
8214 | 8214 | $done = true; |
8215 | 8215 | } |
@@ -8387,7 +8387,7 @@ discard block |
||
8387 | 8387 | if (empty($stringSubject)) |
8388 | 8388 | return ''; |
8389 | 8389 | |
8390 | - $translatable_tokens = preg_match_all('/{(.*?)}/' , $stringSubject, $matches); |
|
8390 | + $translatable_tokens = preg_match_all('/{(.*?)}/', $stringSubject, $matches); |
|
8391 | 8391 | $toFind = array(); |
8392 | 8392 | $replaceWith = array(); |
8393 | 8393 |