|
@@ -377,7 +377,7 @@ discard block |
|
|
block discarded – undo |
|
377
|
377
|
{ |
|
378
|
378
|
$val = 'CASE '; |
|
379
|
379
|
foreach ($members as $k => $v) |
|
380
|
|
- $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
|
380
|
+ $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
381
|
381
|
|
|
382
|
382
|
$val = $val . ' END'; |
|
383
|
383
|
$type = 'raw'; |
|
@@ -1039,11 +1039,11 @@ discard block |
|
|
block discarded – undo |
|
1039
|
1039
|
// Anything that isn't a specification, punctuation mark, or whitespace. |
|
1040
|
1040
|
'~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
|
1041
|
1041
|
// A series of punctuation marks (except %), possibly separated by whitespace. |
|
1042
|
|
- '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
|
1042
|
+ '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1043
|
1043
|
// Unwanted trailing punctuation and whitespace. |
|
1044
|
|
- '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
|
1044
|
+ '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1045
|
1045
|
// Unwanted opening punctuation and whitespace. |
|
1046
|
|
- '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
|
1046
|
+ '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1047
|
1047
|
), |
|
1048
|
1048
|
array( |
|
1049
|
1049
|
'', |
|
@@ -1155,7 +1155,7 @@ discard block |
|
|
block discarded – undo |
|
1155
|
1155
|
$dt_user = new DateTime('@' . $timestamp); |
|
1156
|
1156
|
$temp_offset = $dtz_user->getOffset($dt_user); |
|
1157
|
1157
|
if ($temp_offset !== false) |
|
1158
|
|
- $user_offset = $temp_offset/3600; |
|
|
1158
|
+ $user_offset = $temp_offset / 3600; |
|
1159
|
1159
|
} |
|
1160
|
1160
|
} |
|
1161
|
1161
|
} |
|
@@ -1486,7 +1486,7 @@ discard block |
|
|
block discarded – undo |
|
1486
|
1486
|
$width = !empty($width) ? ' width="' . $width . '"' : ''; |
|
1487
|
1487
|
$height = !empty($height) ? ' height="' . $height . '"' : ''; |
|
1488
|
1488
|
|
|
1489
|
|
- $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>' : ''); |
|
|
1489
|
+ $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>' : ''); |
|
1490
|
1490
|
} |
|
1491
|
1491
|
// Audio. |
|
1492
|
1492
|
elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
|
@@ -1494,7 +1494,7 @@ discard block |
|
|
block discarded – undo |
|
1494
|
1494
|
$width = 'max-width:100%; width: ' . (!empty($width) ? $width : '400') . 'px;'; |
|
1495
|
1495
|
$height = !empty($height) ? 'height: ' . $height . 'px;' : ''; |
|
1496
|
1496
|
|
|
1497
|
|
- $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>'; |
|
|
1497
|
+ $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>'; |
|
1498
|
1498
|
} |
|
1499
|
1499
|
// Anything else. |
|
1500
|
1500
|
else |
|
@@ -1663,7 +1663,7 @@ discard block |
|
|
block discarded – undo |
|
1663
|
1663
|
'type' => 'unparsed_commas_content', |
|
1664
|
1664
|
'test' => '\d+,\d+\]', |
|
1665
|
1665
|
'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
|
1666
|
|
- 'validate' => function (&$tag, &$data, $disabled) |
|
|
1666
|
+ 'validate' => function(&$tag, &$data, $disabled) |
|
1667
|
1667
|
{ |
|
1668
|
1668
|
$scheme = parse_url($data[0], PHP_URL_SCHEME); |
|
1669
|
1669
|
if (empty($scheme)) |
|
@@ -2201,12 +2201,12 @@ discard block |
|
|
block discarded – undo |
|
2201
|
2201
|
$codes[] = array( |
|
2202
|
2202
|
'tag' => 'cowsay', |
|
2203
|
2203
|
'parameters' => array( |
|
2204
|
|
- 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
|
2204
|
+ 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2205
|
2205
|
{ |
|
2206
|
2206
|
return $smcFunc['substr']($eyes . 'oo', 0, 2); |
|
2207
|
2207
|
}, |
|
2208
|
2208
|
), |
|
2209
|
|
- 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
|
2209
|
+ 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2210
|
2210
|
{ |
|
2211
|
2211
|
return $smcFunc['substr']($tongue . ' ', 0, 2); |
|
2212
|
2212
|
}, |
|
@@ -3578,7 +3578,7 @@ discard block |
|
|
block discarded – undo |
|
3578
|
3578
|
if ($fp != false) |
|
3579
|
3579
|
{ |
|
3580
|
3580
|
// Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
|
3581
|
|
- 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"); |
|
|
3581
|
+ 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"); |
|
3582
|
3582
|
|
|
3583
|
3583
|
// Read in the HTTP/1.1 or whatever. |
|
3584
|
3584
|
$test = substr(fgets($fp, 11), -1); |
|
@@ -4182,7 +4182,7 @@ discard block |
|
|
block discarded – undo |
|
4182
|
4182
|
$toMinify = array(); |
|
4183
|
4183
|
$normal = array(); |
|
4184
|
4184
|
|
|
4185
|
|
- uasort($context['css_files'], function ($a, $b) |
|
|
4185
|
+ uasort($context['css_files'], function($a, $b) |
|
4186
|
4186
|
{ |
|
4187
|
4187
|
return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
|
4188
|
4188
|
}); |
|
@@ -5478,7 +5478,7 @@ discard block |
|
|
block discarded – undo |
|
5478
|
5478
|
{ |
|
5479
|
5479
|
fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
|
5480
|
5480
|
fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
|
5481
|
|
- fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
|
5481
|
+ fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5482
|
5482
|
if ($keep_alive) |
|
5483
|
5483
|
fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
|
5484
|
5484
|
else |
|
@@ -5488,7 +5488,7 @@ discard block |
|
|
block discarded – undo |
|
5488
|
5488
|
{ |
|
5489
|
5489
|
fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
|
5490
|
5490
|
fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
|
5491
|
|
- fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
|
5491
|
+ fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5492
|
5492
|
if ($keep_alive) |
|
5493
|
5493
|
fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
|
5494
|
5494
|
else |
|
@@ -5736,13 +5736,13 @@ discard block |
|
|
block discarded – undo |
|
5736
|
5736
|
|
|
5737
|
5737
|
// UTF-8 occurences of MS special characters |
|
5738
|
5738
|
$findchars_utf8 = array( |
|
5739
|
|
- "\xe2\x80\x9a", // single low-9 quotation mark |
|
5740
|
|
- "\xe2\x80\x9e", // double low-9 quotation mark |
|
5741
|
|
- "\xe2\x80\xa6", // horizontal ellipsis |
|
5742
|
|
- "\xe2\x80\x98", // left single curly quote |
|
5743
|
|
- "\xe2\x80\x99", // right single curly quote |
|
5744
|
|
- "\xe2\x80\x9c", // left double curly quote |
|
5745
|
|
- "\xe2\x80\x9d", // right double curly quote |
|
|
5739
|
+ "\xe2\x80\x9a", // single low-9 quotation mark |
|
|
5740
|
+ "\xe2\x80\x9e", // double low-9 quotation mark |
|
|
5741
|
+ "\xe2\x80\xa6", // horizontal ellipsis |
|
|
5742
|
+ "\xe2\x80\x98", // left single curly quote |
|
|
5743
|
+ "\xe2\x80\x99", // right single curly quote |
|
|
5744
|
+ "\xe2\x80\x9c", // left double curly quote |
|
|
5745
|
+ "\xe2\x80\x9d", // right double curly quote |
|
5746
|
5746
|
); |
|
5747
|
5747
|
|
|
5748
|
5748
|
// windows 1252 / iso equivalents |
|
@@ -5758,13 +5758,13 @@ discard block |
|
|
block discarded – undo |
|
5758
|
5758
|
|
|
5759
|
5759
|
// safe replacements |
|
5760
|
5760
|
$replacechars = array( |
|
5761
|
|
- ',', // ‚ |
|
5762
|
|
- ',,', // „ |
|
5763
|
|
- '...', // … |
|
5764
|
|
- "'", // ‘ |
|
5765
|
|
- "'", // ’ |
|
5766
|
|
- '"', // “ |
|
5767
|
|
- '"', // ” |
|
|
5761
|
+ ',', // ‚ |
|
|
5762
|
+ ',,', // „ |
|
|
5763
|
+ '...', // … |
|
|
5764
|
+ "'", // ‘ |
|
|
5765
|
+ "'", // ’ |
|
|
5766
|
+ '"', // “ |
|
|
5767
|
+ '"', // ” |
|
5768
|
5768
|
); |
|
5769
|
5769
|
|
|
5770
|
5770
|
if ($context['utf8']) |
|
@@ -6949,7 +6949,7 @@ discard block |
|
|
block discarded – undo |
|
6949
|
6949
|
EXISTS ( |
|
6950
|
6950
|
SELECT bpv.id_board |
|
6951
|
6951
|
FROM ' . $db_prefix . 'board_permissions_view AS bpv |
|
6952
|
|
- WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
|
6952
|
+ WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
6953
|
6953
|
AND bpv.deny = 0 |
|
6954
|
6954
|
AND bpv.id_board = b.id_board |
|
6955
|
6955
|
)'; |
|
@@ -6959,7 +6959,7 @@ discard block |
|
|
block discarded – undo |
|
6959
|
6959
|
AND NOT EXISTS ( |
|
6960
|
6960
|
SELECT bpv.id_board |
|
6961
|
6961
|
FROM ' . $db_prefix . 'board_permissions_view AS bpv |
|
6962
|
|
- WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
|
6962
|
+ WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
6963
|
6963
|
AND bpv.deny = 1 |
|
6964
|
6964
|
AND bpv.id_board = b.id_board |
|
6965
|
6965
|
)'; |
|
@@ -7230,8 +7230,8 @@ discard block |
|
|
block discarded – undo |
|
7230
|
7230
|
$i = 0; |
|
7231
|
7231
|
while (empty($done)) |
|
7232
|
7232
|
{ |
|
7233
|
|
- if (strpos($format, '{'. --$i . '}') !== false) |
|
7234
|
|
- $replacements['{'. $i . '}'] = array_pop($list); |
|
|
7233
|
+ if (strpos($format, '{' . --$i . '}') !== false) |
|
|
7234
|
+ $replacements['{' . $i . '}'] = array_pop($list); |
|
7235
|
7235
|
else |
|
7236
|
7236
|
$done = true; |
|
7237
|
7237
|
} |
|
@@ -7241,8 +7241,8 @@ discard block |
|
|
block discarded – undo |
|
7241
|
7241
|
$i = 0; |
|
7242
|
7242
|
while (empty($done)) |
|
7243
|
7243
|
{ |
|
7244
|
|
- if (strpos($format, '{'. ++$i . '}') !== false) |
|
7245
|
|
- $replacements['{'. $i . '}'] = array_shift($list); |
|
|
7244
|
+ if (strpos($format, '{' . ++$i . '}') !== false) |
|
|
7245
|
+ $replacements['{' . $i . '}'] = array_shift($list); |
|
7246
|
7246
|
else |
|
7247
|
7247
|
$done = true; |
|
7248
|
7248
|
} |