|
@@ -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)) |
|
@@ -2173,12 +2173,12 @@ discard block |
|
|
block discarded – undo |
|
2173
|
2173
|
$codes[] = array( |
|
2174
|
2174
|
'tag' => 'cowsay', |
|
2175
|
2175
|
'parameters' => array( |
|
2176
|
|
- 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
|
2176
|
+ 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2177
|
2177
|
{ |
|
2178
|
2178
|
return $smcFunc['substr']($eyes . 'oo', 0, 2); |
|
2179
|
2179
|
}, |
|
2180
|
2180
|
), |
|
2181
|
|
- 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
|
2181
|
+ 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2182
|
2182
|
{ |
|
2183
|
2183
|
return $smcFunc['substr']($tongue . ' ', 0, 2); |
|
2184
|
2184
|
}, |
|
@@ -3562,7 +3562,7 @@ discard block |
|
|
block discarded – undo |
|
3562
|
3562
|
if ($fp != false) |
|
3563
|
3563
|
{ |
|
3564
|
3564
|
// Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
|
3565
|
|
- 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"); |
|
|
3565
|
+ 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"); |
|
3566
|
3566
|
|
|
3567
|
3567
|
// Read in the HTTP/1.1 or whatever. |
|
3568
|
3568
|
$test = substr(fgets($fp, 11), -1); |
|
@@ -4179,7 +4179,7 @@ discard block |
|
|
block discarded – undo |
|
4179
|
4179
|
$toMinify = array(); |
|
4180
|
4180
|
$normal = array(); |
|
4181
|
4181
|
|
|
4182
|
|
- uasort($context['css_files'], function ($a, $b) |
|
|
4182
|
+ uasort($context['css_files'], function($a, $b) |
|
4183
|
4183
|
{ |
|
4184
|
4184
|
return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
|
4185
|
4185
|
}); |
|
@@ -5476,7 +5476,7 @@ discard block |
|
|
block discarded – undo |
|
5476
|
5476
|
{ |
|
5477
|
5477
|
fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
|
5478
|
5478
|
fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
|
5479
|
|
- fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
|
5479
|
+ fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5480
|
5480
|
if ($keep_alive) |
|
5481
|
5481
|
fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
|
5482
|
5482
|
else |
|
@@ -5486,7 +5486,7 @@ discard block |
|
|
block discarded – undo |
|
5486
|
5486
|
{ |
|
5487
|
5487
|
fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
|
5488
|
5488
|
fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
|
5489
|
|
- fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
|
5489
|
+ fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5490
|
5490
|
if ($keep_alive) |
|
5491
|
5491
|
fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
|
5492
|
5492
|
else |
|
@@ -5735,13 +5735,13 @@ discard block |
|
|
block discarded – undo |
|
5735
|
5735
|
|
|
5736
|
5736
|
// UTF-8 occurences of MS special characters |
|
5737
|
5737
|
$findchars_utf8 = array( |
|
5738
|
|
- "\xe2\x80\x9a", // single low-9 quotation mark |
|
5739
|
|
- "\xe2\x80\x9e", // double low-9 quotation mark |
|
5740
|
|
- "\xe2\x80\xa6", // horizontal ellipsis |
|
5741
|
|
- "\xe2\x80\x98", // left single curly quote |
|
5742
|
|
- "\xe2\x80\x99", // right single curly quote |
|
5743
|
|
- "\xe2\x80\x9c", // left double curly quote |
|
5744
|
|
- "\xe2\x80\x9d", // right double curly quote |
|
|
5738
|
+ "\xe2\x80\x9a", // single low-9 quotation mark |
|
|
5739
|
+ "\xe2\x80\x9e", // double low-9 quotation mark |
|
|
5740
|
+ "\xe2\x80\xa6", // horizontal ellipsis |
|
|
5741
|
+ "\xe2\x80\x98", // left single curly quote |
|
|
5742
|
+ "\xe2\x80\x99", // right single curly quote |
|
|
5743
|
+ "\xe2\x80\x9c", // left double curly quote |
|
|
5744
|
+ "\xe2\x80\x9d", // right double curly quote |
|
5745
|
5745
|
); |
|
5746
|
5746
|
|
|
5747
|
5747
|
// windows 1252 / iso equivalents |
|
@@ -5757,13 +5757,13 @@ discard block |
|
|
block discarded – undo |
|
5757
|
5757
|
|
|
5758
|
5758
|
// safe replacements |
|
5759
|
5759
|
$replacechars = array( |
|
5760
|
|
- ',', // ‚ |
|
5761
|
|
- ',,', // „ |
|
5762
|
|
- '...', // … |
|
5763
|
|
- "'", // ‘ |
|
5764
|
|
- "'", // ’ |
|
5765
|
|
- '"', // “ |
|
5766
|
|
- '"', // ” |
|
|
5760
|
+ ',', // ‚ |
|
|
5761
|
+ ',,', // „ |
|
|
5762
|
+ '...', // … |
|
|
5763
|
+ "'", // ‘ |
|
|
5764
|
+ "'", // ’ |
|
|
5765
|
+ '"', // “ |
|
|
5766
|
+ '"', // ” |
|
5767
|
5767
|
); |
|
5768
|
5768
|
|
|
5769
|
5769
|
if ($context['utf8']) |
|
@@ -6108,7 +6108,7 @@ discard block |
|
|
block discarded – undo |
|
6108
|
6108
|
$desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : ''); |
|
6109
|
6109
|
|
|
6110
|
6110
|
// We don't want abbreviations like '+03' or '-11'. |
|
6111
|
|
- $abbrs = array_filter($tzvalue['abbrs'], function ($abbr) { |
|
|
6111
|
+ $abbrs = array_filter($tzvalue['abbrs'], function($abbr) { |
|
6112
|
6112
|
return !strspn($abbr, '+-'); |
|
6113
|
6113
|
}); |
|
6114
|
6114
|
$abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array(); |
|
@@ -7072,7 +7072,7 @@ discard block |
|
|
block discarded – undo |
|
7072
|
7072
|
EXISTS ( |
|
7073
|
7073
|
SELECT bpv.id_board |
|
7074
|
7074
|
FROM ' . $db_prefix . 'board_permissions_view AS bpv |
|
7075
|
|
- WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
|
7075
|
+ WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7076
|
7076
|
AND bpv.deny = 0 |
|
7077
|
7077
|
AND bpv.id_board = b.id_board |
|
7078
|
7078
|
)'; |
|
@@ -7082,7 +7082,7 @@ discard block |
|
|
block discarded – undo |
|
7082
|
7082
|
AND NOT EXISTS ( |
|
7083
|
7083
|
SELECT bpv.id_board |
|
7084
|
7084
|
FROM ' . $db_prefix . 'board_permissions_view AS bpv |
|
7085
|
|
- WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
|
7085
|
+ WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7086
|
7086
|
AND bpv.deny = 1 |
|
7087
|
7087
|
AND bpv.id_board = b.id_board |
|
7088
|
7088
|
)'; |
|
@@ -7353,8 +7353,8 @@ discard block |
|
|
block discarded – undo |
|
7353
|
7353
|
$i = 0; |
|
7354
|
7354
|
while (empty($done)) |
|
7355
|
7355
|
{ |
|
7356
|
|
- if (strpos($format, '{'. --$i . '}') !== false) |
|
7357
|
|
- $replacements['{'. $i . '}'] = array_pop($list); |
|
|
7356
|
+ if (strpos($format, '{' . --$i . '}') !== false) |
|
|
7357
|
+ $replacements['{' . $i . '}'] = array_pop($list); |
|
7358
|
7358
|
else |
|
7359
|
7359
|
$done = true; |
|
7360
|
7360
|
} |
|
@@ -7364,8 +7364,8 @@ discard block |
|
|
block discarded – undo |
|
7364
|
7364
|
$i = 0; |
|
7365
|
7365
|
while (empty($done)) |
|
7366
|
7366
|
{ |
|
7367
|
|
- if (strpos($format, '{'. ++$i . '}') !== false) |
|
7368
|
|
- $replacements['{'. $i . '}'] = array_shift($list); |
|
|
7367
|
+ if (strpos($format, '{' . ++$i . '}') !== false) |
|
|
7368
|
+ $replacements['{' . $i . '}'] = array_shift($list); |
|
7369
|
7369
|
else |
|
7370
|
7370
|
$done = true; |
|
7371
|
7371
|
} |