@@ -619,7 +619,7 @@ |
||
619 | 619 | if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn()) |
620 | 620 | fatal_lang_error('login_ssl_required', false); |
621 | 621 | |
622 | - $password = isset($_POST['oldpasswrd']) ? $_POST['oldpasswrd'] : ''; |
|
622 | + $password = isset($_POST['oldpasswrd']) ? $_POST['oldpasswrd'] : ''; |
|
623 | 623 | |
624 | 624 | // You didn't even enter a password! |
625 | 625 | if (trim($password) == '') |
@@ -1155,7 +1155,7 @@ |
||
1155 | 1155 | // We're really just checking for entries which are create table AND add columns (etc). |
1156 | 1156 | $tables = array(); |
1157 | 1157 | |
1158 | - usort($db_package_log, function ($a, $b) |
|
1158 | + usort($db_package_log, function($a, $b) |
|
1159 | 1159 | { |
1160 | 1160 | if ($a[0] == $b[0]) |
1161 | 1161 | return 0; |
@@ -100,18 +100,22 @@ |
||
100 | 100 | $tempTab++; |
101 | 101 | $context['tabindex'] = $tempTab; |
102 | 102 | |
103 | - foreach ($context['richedit_buttons'] as $name => $button) { |
|
104 | - if ($name == 'spell_check') { |
|
103 | + foreach ($context['richedit_buttons'] as $name => $button) |
|
104 | + { |
|
105 | + if ($name == 'spell_check') |
|
106 | + { |
|
105 | 107 | $button['onclick'] = 'oEditorHandle_' . $editor_id . '.spellCheckStart();'; |
106 | 108 | } |
107 | 109 | |
108 | - if ($name == 'preview') { |
|
110 | + if ($name == 'preview') |
|
111 | + { |
|
109 | 112 | $button['value'] = isset($editor_context['labels']['preview_button']) ? $editor_context['labels']['preview_button'] : $button['value']; |
110 | 113 | $button['onclick'] = $editor_context['preview_type'] == 2 ? '' : 'return submitThisOnce(this);'; |
111 | 114 | $button['show'] = $editor_context['preview_type']; |
112 | 115 | } |
113 | 116 | |
114 | - if ($button['show']) { |
|
117 | + if ($button['show']) |
|
118 | + { |
|
115 | 119 | echo ' |
116 | 120 | <input type="', $button['type'], '"', $button['type'] == 'hidden' ? ' id="' . $name . '"' : '', ' name="', $name, '" value="', $button['value'], '"', $button['type'] != 'hidden' ? ' tabindex="' . --$tempTab . '"' : '', !empty($button['onclick']) ? ' onclick="' . $button['onclick'] . '"' : '', !empty($button['accessKey']) ? ' accesskey="' . $button['accessKey'] . '"' : '', $button['type'] != 'hidden' ? ' class="button"' : '', '>'; |
117 | 121 | } |
@@ -7082,32 +7082,32 @@ discard block |
||
7082 | 7082 | */ |
7083 | 7083 | function truncate_array($array, $max_length = 1900, $deep = 3) |
7084 | 7084 | { |
7085 | - $array = (array) $array; |
|
7085 | + $array = (array) $array; |
|
7086 | 7086 | |
7087 | - $curr_length = array_length($array, $deep); |
|
7087 | + $curr_length = array_length($array, $deep); |
|
7088 | 7088 | |
7089 | - if ($curr_length <= $max_length) |
|
7090 | - return $array; |
|
7089 | + if ($curr_length <= $max_length) |
|
7090 | + return $array; |
|
7091 | 7091 | |
7092 | - else |
|
7093 | - { |
|
7094 | - // Truncate each element's value to a reasonable length |
|
7095 | - $param_max = floor($max_length / count($array)); |
|
7092 | + else |
|
7093 | + { |
|
7094 | + // Truncate each element's value to a reasonable length |
|
7095 | + $param_max = floor($max_length / count($array)); |
|
7096 | 7096 | |
7097 | - $current_deep = $deep - 1; |
|
7097 | + $current_deep = $deep - 1; |
|
7098 | 7098 | |
7099 | - foreach ($array as $key => &$value) |
|
7100 | - { |
|
7101 | - if (is_array($value)) |
|
7102 | - if ($current_deep > 0) |
|
7103 | - $value = truncate_array($value, $current_deep); |
|
7099 | + foreach ($array as $key => &$value) |
|
7100 | + { |
|
7101 | + if (is_array($value)) |
|
7102 | + if ($current_deep > 0) |
|
7103 | + $value = truncate_array($value, $current_deep); |
|
7104 | 7104 | |
7105 | - else |
|
7106 | - $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
7107 | - } |
|
7105 | + else |
|
7106 | + $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
7107 | + } |
|
7108 | 7108 | |
7109 | - return $array; |
|
7110 | - } |
|
7109 | + return $array; |
|
7110 | + } |
|
7111 | 7111 | } |
7112 | 7112 | |
7113 | 7113 | /** |
@@ -7118,29 +7118,29 @@ discard block |
||
7118 | 7118 | */ |
7119 | 7119 | function array_length($array, $deep = 3) |
7120 | 7120 | { |
7121 | - // Work with arrays |
|
7122 | - $array = (array) $array; |
|
7123 | - $length = 0; |
|
7121 | + // Work with arrays |
|
7122 | + $array = (array) $array; |
|
7123 | + $length = 0; |
|
7124 | 7124 | |
7125 | - $deep_count = $deep - 1; |
|
7125 | + $deep_count = $deep - 1; |
|
7126 | 7126 | |
7127 | - foreach ($array as $value) |
|
7128 | - { |
|
7129 | - // Recursive? |
|
7130 | - if (is_array($value)) |
|
7131 | - { |
|
7132 | - // No can't do |
|
7133 | - if ($deep_count <= 0) |
|
7134 | - continue; |
|
7127 | + foreach ($array as $value) |
|
7128 | + { |
|
7129 | + // Recursive? |
|
7130 | + if (is_array($value)) |
|
7131 | + { |
|
7132 | + // No can't do |
|
7133 | + if ($deep_count <= 0) |
|
7134 | + continue; |
|
7135 | 7135 | |
7136 | - $length += array_length($value, $deep_count); |
|
7137 | - } |
|
7136 | + $length += array_length($value, $deep_count); |
|
7137 | + } |
|
7138 | 7138 | |
7139 | - else |
|
7140 | - $length += strlen($value); |
|
7141 | - } |
|
7139 | + else |
|
7140 | + $length += strlen($value); |
|
7141 | + } |
|
7142 | 7142 | |
7143 | - return $length; |
|
7143 | + return $length; |
|
7144 | 7144 | } |
7145 | 7145 | |
7146 | 7146 | ?> |
7147 | 7147 | \ No newline at end of file |
@@ -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,12 +2169,12 @@ 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 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2175 | 2175 | }, |
2176 | 2176 | ), |
2177 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2177 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2178 | 2178 | { |
2179 | 2179 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2180 | 2180 | }, |
@@ -3546,7 +3546,7 @@ discard block |
||
3546 | 3546 | if ($fp != false) |
3547 | 3547 | { |
3548 | 3548 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
3549 | - 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"); |
|
3549 | + 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"); |
|
3550 | 3550 | |
3551 | 3551 | // Read in the HTTP/1.1 or whatever. |
3552 | 3552 | $test = substr(fgets($fp, 11), -1); |
@@ -4150,7 +4150,7 @@ discard block |
||
4150 | 4150 | $toMinify = array(); |
4151 | 4151 | $normal = array(); |
4152 | 4152 | |
4153 | - usort($context['css_files'], function ($a, $b) |
|
4153 | + usort($context['css_files'], function($a, $b) |
|
4154 | 4154 | { |
4155 | 4155 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4156 | 4156 | }); |
@@ -5446,7 +5446,7 @@ discard block |
||
5446 | 5446 | { |
5447 | 5447 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
5448 | 5448 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5449 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5449 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5450 | 5450 | if ($keep_alive) |
5451 | 5451 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
5452 | 5452 | else |
@@ -5456,7 +5456,7 @@ discard block |
||
5456 | 5456 | { |
5457 | 5457 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
5458 | 5458 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5459 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5459 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5460 | 5460 | if ($keep_alive) |
5461 | 5461 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
5462 | 5462 | else |
@@ -5704,13 +5704,13 @@ discard block |
||
5704 | 5704 | |
5705 | 5705 | // UTF-8 occurences of MS special characters |
5706 | 5706 | $findchars_utf8 = array( |
5707 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
5708 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
5709 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
5710 | - "\xe2\x80\x98", // left single curly quote |
|
5711 | - "\xe2\x80\x99", // right single curly quote |
|
5712 | - "\xe2\x80\x9c", // left double curly quote |
|
5713 | - "\xe2\x80\x9d", // right double curly quote |
|
5707 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
5708 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
5709 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
5710 | + "\xe2\x80\x98", // left single curly quote |
|
5711 | + "\xe2\x80\x99", // right single curly quote |
|
5712 | + "\xe2\x80\x9c", // left double curly quote |
|
5713 | + "\xe2\x80\x9d", // right double curly quote |
|
5714 | 5714 | ); |
5715 | 5715 | |
5716 | 5716 | // windows 1252 / iso equivalents |
@@ -5726,13 +5726,13 @@ discard block |
||
5726 | 5726 | |
5727 | 5727 | // safe replacements |
5728 | 5728 | $replacechars = array( |
5729 | - ',', // ‚ |
|
5730 | - ',,', // „ |
|
5731 | - '...', // … |
|
5732 | - "'", // ‘ |
|
5733 | - "'", // ’ |
|
5734 | - '"', // “ |
|
5735 | - '"', // ” |
|
5729 | + ',', // ‚ |
|
5730 | + ',,', // „ |
|
5731 | + '...', // … |
|
5732 | + "'", // ‘ |
|
5733 | + "'", // ’ |
|
5734 | + '"', // “ |
|
5735 | + '"', // ” |
|
5736 | 5736 | ); |
5737 | 5737 | |
5738 | 5738 | if ($context['utf8']) |
@@ -6917,7 +6917,7 @@ discard block |
||
6917 | 6917 | EXISTS ( |
6918 | 6918 | SELECT bpv.id_board |
6919 | 6919 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6920 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
6920 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
6921 | 6921 | AND bpv.deny = 0 |
6922 | 6922 | AND bpv.id_board = b.id_board |
6923 | 6923 | )'; |
@@ -6927,7 +6927,7 @@ discard block |
||
6927 | 6927 | AND NOT EXISTS ( |
6928 | 6928 | SELECT bpv.id_board |
6929 | 6929 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6930 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
6930 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
6931 | 6931 | AND bpv.deny = 1 |
6932 | 6932 | AND bpv.id_board = b.id_board |
6933 | 6933 | )'; |
@@ -7198,8 +7198,8 @@ discard block |
||
7198 | 7198 | $i = 0; |
7199 | 7199 | while (empty($done)) |
7200 | 7200 | { |
7201 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
7202 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
7201 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
7202 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
7203 | 7203 | else |
7204 | 7204 | $done = true; |
7205 | 7205 | } |
@@ -7209,8 +7209,8 @@ discard block |
||
7209 | 7209 | $i = 0; |
7210 | 7210 | while (empty($done)) |
7211 | 7211 | { |
7212 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
7213 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
7212 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
7213 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
7214 | 7214 | else |
7215 | 7215 | $done = true; |
7216 | 7216 | } |
@@ -279,7 +279,6 @@ discard block |
||
279 | 279 | $condition = 'id_member IN ({array_int:members})'; |
280 | 280 | $parameters['members'] = $members; |
281 | 281 | } |
282 | - |
|
283 | 282 | elseif ($members === null) |
284 | 283 | $condition = '1=1'; |
285 | 284 | |
@@ -382,11 +381,9 @@ discard block |
||
382 | 381 | $val = $val . ' END'; |
383 | 382 | $type = 'raw'; |
384 | 383 | } |
385 | - |
|
386 | 384 | else |
387 | 385 | $val = alert_count($members, true); |
388 | 386 | } |
389 | - |
|
390 | 387 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
391 | 388 | { |
392 | 389 | $val = $var . ' ' . $val . ' 1'; |
@@ -2170,12 +2167,12 @@ discard block |
||
2170 | 2167 | 'tag' => 'cowsay', |
2171 | 2168 | 'parameters' => array( |
2172 | 2169 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2173 | - { |
|
2170 | + { |
|
2174 | 2171 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2175 | 2172 | }, |
2176 | 2173 | ), |
2177 | 2174 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2178 | - { |
|
2175 | + { |
|
2179 | 2176 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2180 | 2177 | }, |
2181 | 2178 | ), |
@@ -3273,7 +3270,7 @@ discard block |
||
3273 | 3270 | |
3274 | 3271 | // Replace away! |
3275 | 3272 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
3276 | - { |
|
3273 | + { |
|
3277 | 3274 | return $smileyPregReplacements[$matches[1]]; |
3278 | 3275 | }, $message); |
3279 | 3276 | } |
@@ -4071,7 +4068,6 @@ discard block |
||
4071 | 4068 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4072 | 4069 | $minSeed = $js_file['options']['seed']; |
4073 | 4070 | } |
4074 | - |
|
4075 | 4071 | else |
4076 | 4072 | { |
4077 | 4073 | echo ' |
@@ -6354,7 +6350,6 @@ discard block |
||
6354 | 6350 | $isWritable = true; |
6355 | 6351 | break; |
6356 | 6352 | } |
6357 | - |
|
6358 | 6353 | else |
6359 | 6354 | @chmod($file, $val); |
6360 | 6355 | } |
@@ -7286,7 +7281,6 @@ discard block |
||
7286 | 7281 | |
7287 | 7282 | $length += array_length($value, $deep_count); |
7288 | 7283 | } |
7289 | - |
|
7290 | 7284 | else |
7291 | 7285 | $length += strlen($value); |
7292 | 7286 | } |
@@ -1707,7 +1707,7 @@ |
||
1707 | 1707 | { |
1708 | 1708 | // Avoid double separators and empty titled sections |
1709 | 1709 | $empty_section = true; |
1710 | - for ($j=$i+1; $j < count($context['theme_options']); $j++) |
|
1710 | + for ($j = $i + 1; $j < count($context['theme_options']); $j++) |
|
1711 | 1711 | { |
1712 | 1712 | // Found another separator, so we're done |
1713 | 1713 | if (!is_array($context['theme_options'][$j])) |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | AND a.is_read = 0' : '') . (!empty($alertIDs) ? ' |
263 | 263 | AND a.id_alert IN ({array_int:alertIDs})' : '') . ' |
264 | 264 | ORDER BY id_alert DESC' . (!empty($limit) ? ' |
265 | - LIMIT {int:limit}' : '') . (!empty($offset) ?' |
|
265 | + LIMIT {int:limit}' : '') . (!empty($offset) ? ' |
|
266 | 266 | OFFSET {int:offset}' : ''), |
267 | 267 | array( |
268 | 268 | 'id_member' => $memID, |
@@ -1101,20 +1101,20 @@ discard block |
||
1101 | 1101 | $context['posts'][$key]['quickbuttons'] = array( |
1102 | 1102 | 'reply' => array( |
1103 | 1103 | 'label' => $txt['reply'], |
1104 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
1104 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
1105 | 1105 | 'icon' => 'reply_button', |
1106 | 1106 | 'show' => $post['can_reply'] |
1107 | 1107 | ), |
1108 | 1108 | 'quote' => array( |
1109 | 1109 | 'label' => $txt['quote_action'], |
1110 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
1110 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
1111 | 1111 | 'icon' => 'quote', |
1112 | 1112 | 'show' => $post['can_quote'] |
1113 | 1113 | ), |
1114 | 1114 | 'remove' => array( |
1115 | 1115 | 'label' => $txt['remove'], |
1116 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
1117 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'" class="you_sure"', |
|
1116 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1117 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '" class="you_sure"', |
|
1118 | 1118 | 'icon' => 'remove_button', |
1119 | 1119 | 'show' => $post['can_delete'] |
1120 | 1120 | ) |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | require_once($sourcedir . '/Load.php'); |
54 | 54 | |
55 | 55 | // If $maintenance is set specifically to 2, then we're upgrading or something. |
56 | -if (!empty($maintenance) && 2 === $maintenance) |
|
56 | +if (!empty($maintenance) && 2 === $maintenance) |
|
57 | 57 | display_maintenance_message(); |
58 | 58 | |
59 | 59 | // Create a variable to store some SMF specific functions in. |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * |
105 | 105 | * @param string $class The fully-qualified class name. |
106 | 106 | */ |
107 | -spl_autoload_register(function ($class) use ($sourcedir) |
|
107 | +spl_autoload_register(function($class) use ($sourcedir) |
|
108 | 108 | { |
109 | 109 | $classMap = array( |
110 | 110 | 'ReCaptcha\\' => 'ReCaptcha/', |
@@ -1257,7 +1257,6 @@ discard block |
||
1257 | 1257 | |
1258 | 1258 | continue; |
1259 | 1259 | } |
1260 | - |
|
1261 | 1260 | else |
1262 | 1261 | { |
1263 | 1262 | $fh = @fopen($path . '/.htaccess', 'w'); |
@@ -1269,7 +1268,6 @@ discard block |
||
1269 | 1268 | Deny from all' . $close); |
1270 | 1269 | fclose($fh); |
1271 | 1270 | } |
1272 | - |
|
1273 | 1271 | else |
1274 | 1272 | $errors[] = 'htaccess_cannot_create_file'; |
1275 | 1273 | } |
@@ -1280,7 +1278,6 @@ discard block |
||
1280 | 1278 | |
1281 | 1279 | continue; |
1282 | 1280 | } |
1283 | - |
|
1284 | 1281 | else |
1285 | 1282 | { |
1286 | 1283 | $fh = @fopen($path . '/index.php', 'w'); |
@@ -1307,7 +1304,6 @@ discard block |
||
1307 | 1304 | ?' . '>'); |
1308 | 1305 | fclose($fh); |
1309 | 1306 | } |
1310 | - |
|
1311 | 1307 | else |
1312 | 1308 | $errors[] = 'index-php_cannot_create_file'; |
1313 | 1309 | } |
@@ -816,7 +816,7 @@ |
||
816 | 816 | |
817 | 817 | $out = 'POST /smf/stats/collect_stats.php HTTP/1.1' . "\r\n"; |
818 | 818 | $out .= 'Host: www.simplemachines.org' . "\r\n"; |
819 | - $out .= 'user-agent: '. SMF_USER_AGENT . "\r\n"; |
|
819 | + $out .= 'user-agent: ' . SMF_USER_AGENT . "\r\n"; |
|
820 | 820 | $out .= 'content-type: application/x-www-form-urlencoded' . "\r\n"; |
821 | 821 | $out .= 'connection: Close' . "\r\n"; |
822 | 822 | $out .= 'content-length: ' . $length . "\r\n\r\n"; |