@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | ); |
93 | 93 | foreach (array('action', 'sa', 'type', 'board', 'boards', 'c', 'u', 'limit', 'offset') as $var) |
94 | 94 | if (isset($_GET[$var])) |
95 | - $feed_meta['self'] .= ($feed_meta['self'] === $scripturl ? '?' : ';' ) . $var . '=' . $_GET[$var]; |
|
95 | + $feed_meta['self'] .= ($feed_meta['self'] === $scripturl ? '?' : ';') . $var . '=' . $_GET[$var]; |
|
96 | 96 | |
97 | 97 | // Handle the cases where a board, boards, or category is asked for. |
98 | 98 | $query_this_board = 1; |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | * namespaces, which could cause it to mangle the XML horrifically |
300 | 300 | * during processing. |
301 | 301 | */ |
302 | - $smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/' . $subaction; |
|
302 | + $smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/' . $subaction; |
|
303 | 303 | |
304 | 304 | // Allow mods to add extra namespaces and tags to the feed/channel |
305 | 305 | $namespaces = array( |
@@ -377,7 +377,7 @@ discard block |
||
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'; |
@@ -1041,11 +1041,11 @@ discard block |
||
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 | '', |
@@ -1460,7 +1460,7 @@ discard block |
||
1460 | 1460 | $width = !empty($width) ? ' width="' . $width . '"' : ''; |
1461 | 1461 | $height = !empty($height) ? ' height="' . $height . '"' : ''; |
1462 | 1462 | |
1463 | - $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>' : ''); |
|
1463 | + $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>' : ''); |
|
1464 | 1464 | } |
1465 | 1465 | // Audio. |
1466 | 1466 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1468,7 +1468,7 @@ discard block |
||
1468 | 1468 | $width = 'max-width:100%; width: ' . (!empty($width) ? $width : '400') . 'px;'; |
1469 | 1469 | $height = !empty($height) ? 'height: ' . $height . 'px;' : ''; |
1470 | 1470 | |
1471 | - $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>'; |
|
1471 | + $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>'; |
|
1472 | 1472 | } |
1473 | 1473 | // Anything else. |
1474 | 1474 | else |
@@ -1631,7 +1631,7 @@ discard block |
||
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)) |
@@ -2169,7 +2169,7 @@ discard block |
||
2169 | 2169 | $codes[] = array( |
2170 | 2170 | 'tag' => 'cowsay', |
2171 | 2171 | 'parameters' => array( |
2172 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2172 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2173 | 2173 | { |
2174 | 2174 | static $css_added; |
2175 | 2175 | |
@@ -2186,7 +2186,7 @@ discard block |
||
2186 | 2186 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2187 | 2187 | }, |
2188 | 2188 | ), |
2189 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2189 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2190 | 2190 | { |
2191 | 2191 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2192 | 2192 | }, |
@@ -3558,7 +3558,7 @@ discard block |
||
3558 | 3558 | if ($fp != false) |
3559 | 3559 | { |
3560 | 3560 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
3561 | - 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"); |
|
3561 | + 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"); |
|
3562 | 3562 | |
3563 | 3563 | // Read in the HTTP/1.1 or whatever. |
3564 | 3564 | $test = substr(fgets($fp, 11), -1); |
@@ -4162,7 +4162,7 @@ discard block |
||
4162 | 4162 | $toMinify = array(); |
4163 | 4163 | $normal = array(); |
4164 | 4164 | |
4165 | - usort($context['css_files'], function ($a, $b) |
|
4165 | + usort($context['css_files'], function($a, $b) |
|
4166 | 4166 | { |
4167 | 4167 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4168 | 4168 | }); |
@@ -5458,7 +5458,7 @@ discard block |
||
5458 | 5458 | { |
5459 | 5459 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
5460 | 5460 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5461 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5461 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5462 | 5462 | if ($keep_alive) |
5463 | 5463 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
5464 | 5464 | else |
@@ -5468,7 +5468,7 @@ discard block |
||
5468 | 5468 | { |
5469 | 5469 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
5470 | 5470 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5471 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5471 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5472 | 5472 | if ($keep_alive) |
5473 | 5473 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
5474 | 5474 | else |
@@ -5716,13 +5716,13 @@ discard block |
||
5716 | 5716 | |
5717 | 5717 | // UTF-8 occurences of MS special characters |
5718 | 5718 | $findchars_utf8 = array( |
5719 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
5720 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
5721 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
5722 | - "\xe2\x80\x98", // left single curly quote |
|
5723 | - "\xe2\x80\x99", // right single curly quote |
|
5724 | - "\xe2\x80\x9c", // left double curly quote |
|
5725 | - "\xe2\x80\x9d", // right double curly quote |
|
5719 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
5720 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
5721 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
5722 | + "\xe2\x80\x98", // left single curly quote |
|
5723 | + "\xe2\x80\x99", // right single curly quote |
|
5724 | + "\xe2\x80\x9c", // left double curly quote |
|
5725 | + "\xe2\x80\x9d", // right double curly quote |
|
5726 | 5726 | ); |
5727 | 5727 | |
5728 | 5728 | // windows 1252 / iso equivalents |
@@ -5738,13 +5738,13 @@ discard block |
||
5738 | 5738 | |
5739 | 5739 | // safe replacements |
5740 | 5740 | $replacechars = array( |
5741 | - ',', // ‚ |
|
5742 | - ',,', // „ |
|
5743 | - '...', // … |
|
5744 | - "'", // ‘ |
|
5745 | - "'", // ’ |
|
5746 | - '"', // “ |
|
5747 | - '"', // ” |
|
5741 | + ',', // ‚ |
|
5742 | + ',,', // „ |
|
5743 | + '...', // … |
|
5744 | + "'", // ‘ |
|
5745 | + "'", // ’ |
|
5746 | + '"', // “ |
|
5747 | + '"', // ” |
|
5748 | 5748 | ); |
5749 | 5749 | |
5750 | 5750 | if ($context['utf8']) |
@@ -6929,7 +6929,7 @@ discard block |
||
6929 | 6929 | EXISTS ( |
6930 | 6930 | SELECT bpv.id_board |
6931 | 6931 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6932 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
6932 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
6933 | 6933 | AND bpv.deny = 0 |
6934 | 6934 | AND bpv.id_board = b.id_board |
6935 | 6935 | )'; |
@@ -6939,7 +6939,7 @@ discard block |
||
6939 | 6939 | AND NOT EXISTS ( |
6940 | 6940 | SELECT bpv.id_board |
6941 | 6941 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6942 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
6942 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
6943 | 6943 | AND bpv.deny = 1 |
6944 | 6944 | AND bpv.id_board = b.id_board |
6945 | 6945 | )'; |
@@ -7210,8 +7210,8 @@ discard block |
||
7210 | 7210 | $i = 0; |
7211 | 7211 | while (empty($done)) |
7212 | 7212 | { |
7213 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
7214 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
7213 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
7214 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
7215 | 7215 | else |
7216 | 7216 | $done = true; |
7217 | 7217 | } |
@@ -7221,8 +7221,8 @@ discard block |
||
7221 | 7221 | $i = 0; |
7222 | 7222 | while (empty($done)) |
7223 | 7223 | { |
7224 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
7225 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
7224 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
7225 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
7226 | 7226 | else |
7227 | 7227 | $done = true; |
7228 | 7228 | } |
@@ -355,8 +355,8 @@ |
||
355 | 355 | elseif (isset($_POST['delall']) && isset($filter)) |
356 | 356 | { |
357 | 357 | // ip need a different placeholder type |
358 | - $filter_type = $filter['variable'] == 'ip'? 'inet' : 'string'; |
|
359 | - $filter_op = $filter['variable'] == 'ip'? '=' : 'LIKE'; |
|
358 | + $filter_type = $filter['variable'] == 'ip' ? 'inet' : 'string'; |
|
359 | + $filter_op = $filter['variable'] == 'ip' ? '=' : 'LIKE'; |
|
360 | 360 | $smcFunc['db_query']('', ' |
361 | 361 | DELETE FROM {db_prefix}log_errors |
362 | 362 | WHERE ' . $filter['variable'] . ' ' . $filter_op . ' {' . $filter_type . ':filter}', |