|
@@ -378,7 +378,7 @@ discard block |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
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 |
|
|
block discarded – undo |
|
1744
|
1744
|
else |
|
1745
|
1745
|
$url = get_proxied_url($url); |
|
1746
|
1746
|
|
|
1747
|
|
- $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ' alt=""'; |
|
1748
|
|
- $title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : ''; |
|
|
1747
|
+ $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ' 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 |
|
|
block discarded – undo |
|
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
|
}, |
|
@@ -3813,7 +3813,7 @@ discard block |
|
|
block discarded – undo |
|
3813
|
3813
|
if ($fp != false) |
|
3814
|
3814
|
{ |
|
3815
|
3815
|
// Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
|
3816
|
|
- 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"); |
|
|
3816
|
+ 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
|
3817
|
|
|
3818
|
3818
|
// Read in the HTTP/1.1 or whatever. |
|
3819
|
3819
|
$test = substr(fgets($fp, 11), -1); |
|
@@ -4430,7 +4430,7 @@ discard block |
|
|
block discarded – undo |
|
4430
|
4430
|
$toMinify = array(); |
|
4431
|
4431
|
$normal = array(); |
|
4432
|
4432
|
|
|
4433
|
|
- uasort($context['css_files'], function ($a, $b) |
|
|
4433
|
+ uasort($context['css_files'], function($a, $b) |
|
4434
|
4434
|
{ |
|
4435
|
4435
|
return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
|
4436
|
4436
|
}); |
|
@@ -5727,7 +5727,7 @@ discard block |
|
|
block discarded – undo |
|
5727
|
5727
|
{ |
|
5728
|
5728
|
fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
|
5729
|
5729
|
fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
|
5730
|
|
- fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
|
5730
|
+ fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5731
|
5731
|
if ($keep_alive) |
|
5732
|
5732
|
fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
|
5733
|
5733
|
else |
|
@@ -5737,7 +5737,7 @@ discard block |
|
|
block discarded – undo |
|
5737
|
5737
|
{ |
|
5738
|
5738
|
fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
|
5739
|
5739
|
fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
|
5740
|
|
- fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
|
5740
|
+ fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5741
|
5741
|
if ($keep_alive) |
|
5742
|
5742
|
fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
|
5743
|
5743
|
else |
|
@@ -5986,13 +5986,13 @@ discard block |
|
|
block discarded – undo |
|
5986
|
5986
|
|
|
5987
|
5987
|
// UTF-8 occurences of MS special characters |
|
5988
|
5988
|
$findchars_utf8 = array( |
|
5989
|
|
- "\xe2\x80\x9a", // single low-9 quotation mark |
|
5990
|
|
- "\xe2\x80\x9e", // double low-9 quotation mark |
|
5991
|
|
- "\xe2\x80\xa6", // horizontal ellipsis |
|
5992
|
|
- "\xe2\x80\x98", // left single curly quote |
|
5993
|
|
- "\xe2\x80\x99", // right single curly quote |
|
5994
|
|
- "\xe2\x80\x9c", // left double curly quote |
|
5995
|
|
- "\xe2\x80\x9d", // right double curly quote |
|
|
5989
|
+ "\xe2\x80\x9a", // single low-9 quotation mark |
|
|
5990
|
+ "\xe2\x80\x9e", // double low-9 quotation mark |
|
|
5991
|
+ "\xe2\x80\xa6", // horizontal ellipsis |
|
|
5992
|
+ "\xe2\x80\x98", // left single curly quote |
|
|
5993
|
+ "\xe2\x80\x99", // right single curly quote |
|
|
5994
|
+ "\xe2\x80\x9c", // left double curly quote |
|
|
5995
|
+ "\xe2\x80\x9d", // right double curly quote |
|
5996
|
5996
|
); |
|
5997
|
5997
|
|
|
5998
|
5998
|
// windows 1252 / iso equivalents |
|
@@ -6008,13 +6008,13 @@ discard block |
|
|
block discarded – undo |
|
6008
|
6008
|
|
|
6009
|
6009
|
// safe replacements |
|
6010
|
6010
|
$replacechars = array( |
|
6011
|
|
- ',', // ‚ |
|
6012
|
|
- ',,', // „ |
|
6013
|
|
- '...', // … |
|
6014
|
|
- "'", // ‘ |
|
6015
|
|
- "'", // ’ |
|
6016
|
|
- '"', // “ |
|
6017
|
|
- '"', // ” |
|
|
6011
|
+ ',', // ‚ |
|
|
6012
|
+ ',,', // „ |
|
|
6013
|
+ '...', // … |
|
|
6014
|
+ "'", // ‘ |
|
|
6015
|
+ "'", // ’ |
|
|
6016
|
+ '"', // “ |
|
|
6017
|
+ '"', // ” |
|
6018
|
6018
|
); |
|
6019
|
6019
|
|
|
6020
|
6020
|
if ($context['utf8']) |
|
@@ -6359,7 +6359,7 @@ discard block |
|
|
block discarded – undo |
|
6359
|
6359
|
$desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : ''); |
|
6360
|
6360
|
|
|
6361
|
6361
|
// We don't want abbreviations like '+03' or '-11'. |
|
6362
|
|
- $abbrs = array_filter($tzvalue['abbrs'], function ($abbr) { |
|
|
6362
|
+ $abbrs = array_filter($tzvalue['abbrs'], function($abbr) { |
|
6363
|
6363
|
return !strspn($abbr, '+-'); |
|
6364
|
6364
|
}); |
|
6365
|
6365
|
$abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array(); |
|
@@ -7323,7 +7323,7 @@ discard block |
|
|
block discarded – undo |
|
7323
|
7323
|
EXISTS ( |
|
7324
|
7324
|
SELECT bpv.id_board |
|
7325
|
7325
|
FROM ' . $db_prefix . 'board_permissions_view AS bpv |
|
7326
|
|
- WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
|
7326
|
+ WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7327
|
7327
|
AND bpv.deny = 0 |
|
7328
|
7328
|
AND bpv.id_board = b.id_board |
|
7329
|
7329
|
)'; |
|
@@ -7333,7 +7333,7 @@ discard block |
|
|
block discarded – undo |
|
7333
|
7333
|
AND NOT EXISTS ( |
|
7334
|
7334
|
SELECT bpv.id_board |
|
7335
|
7335
|
FROM ' . $db_prefix . 'board_permissions_view AS bpv |
|
7336
|
|
- WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
|
7336
|
+ WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7337
|
7337
|
AND bpv.deny = 1 |
|
7338
|
7338
|
AND bpv.id_board = b.id_board |
|
7339
|
7339
|
)'; |
|
@@ -7638,8 +7638,8 @@ discard block |
|
|
block discarded – undo |
|
7638
|
7638
|
$i = 0; |
|
7639
|
7639
|
while (empty($done)) |
|
7640
|
7640
|
{ |
|
7641
|
|
- if (strpos($format, '{'. --$i . '}') !== false) |
|
7642
|
|
- $replacements['{'. $i . '}'] = array_pop($list); |
|
|
7641
|
+ if (strpos($format, '{' . --$i . '}') !== false) |
|
|
7642
|
+ $replacements['{' . $i . '}'] = array_pop($list); |
|
7643
|
7643
|
else |
|
7644
|
7644
|
$done = true; |
|
7645
|
7645
|
} |
|
@@ -7649,8 +7649,8 @@ discard block |
|
|
block discarded – undo |
|
7649
|
7649
|
$i = 0; |
|
7650
|
7650
|
while (empty($done)) |
|
7651
|
7651
|
{ |
|
7652
|
|
- if (strpos($format, '{'. ++$i . '}') !== false) |
|
7653
|
|
- $replacements['{'. $i . '}'] = array_shift($list); |
|
|
7652
|
+ if (strpos($format, '{' . ++$i . '}') !== false) |
|
|
7653
|
+ $replacements['{' . $i . '}'] = array_shift($list); |
|
7654
|
7654
|
else |
|
7655
|
7655
|
$done = true; |
|
7656
|
7656
|
} |