@@ -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 |
@@ -306,7 +306,6 @@ discard block |
||
| 306 | 306 | $condition = 'id_member IN ({array_int:members})'; |
| 307 | 307 | $parameters['members'] = $members; |
| 308 | 308 | } |
| 309 | - |
|
| 310 | 309 | elseif ($members === null) |
| 311 | 310 | $condition = '1=1'; |
| 312 | 311 | |
@@ -409,11 +408,9 @@ discard block |
||
| 409 | 408 | $val = $val . ' END'; |
| 410 | 409 | $type = 'raw'; |
| 411 | 410 | } |
| 412 | - |
|
| 413 | 411 | else |
| 414 | 412 | $val = alert_count($members, true); |
| 415 | 413 | } |
| 416 | - |
|
| 417 | 414 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
| 418 | 415 | { |
| 419 | 416 | $val = $var . ' ' . $val . ' 1'; |
@@ -2211,7 +2208,7 @@ discard block |
||
| 2211 | 2208 | 'tag' => 'cowsay', |
| 2212 | 2209 | 'parameters' => array( |
| 2213 | 2210 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
| 2214 | - { |
|
| 2211 | + { |
|
| 2215 | 2212 | static $css_added; |
| 2216 | 2213 | |
| 2217 | 2214 | if (empty($css_added)) |
@@ -2228,7 +2225,7 @@ discard block |
||
| 2228 | 2225 | }, |
| 2229 | 2226 | ), |
| 2230 | 2227 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
| 2231 | - { |
|
| 2228 | + { |
|
| 2232 | 2229 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
| 2233 | 2230 | }, |
| 2234 | 2231 | ), |
@@ -3326,7 +3323,7 @@ discard block |
||
| 3326 | 3323 | |
| 3327 | 3324 | // Replace away! |
| 3328 | 3325 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
| 3329 | - { |
|
| 3326 | + { |
|
| 3330 | 3327 | return $smileyPregReplacements[$matches[1]]; |
| 3331 | 3328 | }, $message); |
| 3332 | 3329 | } |
@@ -4113,7 +4110,6 @@ discard block |
||
| 4113 | 4110 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
| 4114 | 4111 | $minSeed = $js_file['options']['seed']; |
| 4115 | 4112 | } |
| 4116 | - |
|
| 4117 | 4113 | else |
| 4118 | 4114 | { |
| 4119 | 4115 | echo ' |
@@ -6295,7 +6291,6 @@ discard block |
||
| 6295 | 6291 | $isWritable = true; |
| 6296 | 6292 | break; |
| 6297 | 6293 | } |
| 6298 | - |
|
| 6299 | 6294 | else |
| 6300 | 6295 | @chmod($file, $val); |
| 6301 | 6296 | } |
@@ -7227,7 +7222,6 @@ discard block |
||
| 7227 | 7222 | |
| 7228 | 7223 | $length += array_length($value, $deep_count); |
| 7229 | 7224 | } |
| 7230 | - |
|
| 7231 | 7225 | else |
| 7232 | 7226 | $length += strlen($value); |
| 7233 | 7227 | } |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | { |
| 405 | 405 | $val = 'CASE '; |
| 406 | 406 | foreach ($members as $k => $v) |
| 407 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
| 407 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
| 408 | 408 | |
| 409 | 409 | $val = $val . ' END'; |
| 410 | 410 | $type = 'raw'; |
@@ -1068,11 +1068,11 @@ discard block |
||
| 1068 | 1068 | // Anything that isn't a specification, punctuation mark, or whitespace. |
| 1069 | 1069 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
| 1070 | 1070 | // A series of punctuation marks (except %), possibly separated by whitespace. |
| 1071 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
| 1071 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
| 1072 | 1072 | // Unwanted trailing punctuation and whitespace. |
| 1073 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
| 1073 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
| 1074 | 1074 | // Unwanted opening punctuation and whitespace. |
| 1075 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
| 1075 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
| 1076 | 1076 | ), |
| 1077 | 1077 | array( |
| 1078 | 1078 | '', |
@@ -1479,7 +1479,7 @@ discard block |
||
| 1479 | 1479 | $width = !empty($width) ? ' width="' . $width . '"' : ''; |
| 1480 | 1480 | $height = !empty($height) ? ' height="' . $height . '"' : ''; |
| 1481 | 1481 | |
| 1482 | - $returnContext .= '<div class="videocontainer"><div><video controls preload="none" src="'. $currentAttachment['href'] . '" playsinline' . $width . $height . ' style="object-fit:contain;"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
| 1482 | + $returnContext .= '<div class="videocontainer"><div><video controls preload="none" src="' . $currentAttachment['href'] . '" playsinline' . $width . $height . ' style="object-fit:contain;"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
| 1483 | 1483 | } |
| 1484 | 1484 | // Audio. |
| 1485 | 1485 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1487,7 +1487,7 @@ discard block |
||
| 1487 | 1487 | $width = 'max-width:100%; width: ' . (!empty($width) ? $width : '400') . 'px;'; |
| 1488 | 1488 | $height = !empty($height) ? 'height: ' . $height . 'px;' : ''; |
| 1489 | 1489 | |
| 1490 | - $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>'; |
|
| 1490 | + $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>'; |
|
| 1491 | 1491 | } |
| 1492 | 1492 | // Anything else. |
| 1493 | 1493 | else |
@@ -1650,7 +1650,7 @@ discard block |
||
| 1650 | 1650 | 'type' => 'unparsed_commas_content', |
| 1651 | 1651 | 'test' => '\d+,\d+\]', |
| 1652 | 1652 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
| 1653 | - 'validate' => function (&$tag, &$data, $disabled) |
|
| 1653 | + 'validate' => function(&$tag, &$data, $disabled) |
|
| 1654 | 1654 | { |
| 1655 | 1655 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
| 1656 | 1656 | if (empty($scheme)) |
@@ -2188,7 +2188,7 @@ discard block |
||
| 2188 | 2188 | $codes[] = array( |
| 2189 | 2189 | 'tag' => 'cowsay', |
| 2190 | 2190 | 'parameters' => array( |
| 2191 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
| 2191 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
| 2192 | 2192 | { |
| 2193 | 2193 | static $css_added; |
| 2194 | 2194 | |
@@ -2205,7 +2205,7 @@ discard block |
||
| 2205 | 2205 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
| 2206 | 2206 | }, |
| 2207 | 2207 | ), |
| 2208 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
| 2208 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
| 2209 | 2209 | { |
| 2210 | 2210 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
| 2211 | 2211 | }, |
@@ -3577,7 +3577,7 @@ discard block |
||
| 3577 | 3577 | if ($fp != false) |
| 3578 | 3578 | { |
| 3579 | 3579 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
| 3580 | - 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"); |
|
| 3580 | + 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 | 3581 | |
| 3582 | 3582 | // Read in the HTTP/1.1 or whatever. |
| 3583 | 3583 | $test = substr(fgets($fp, 11), -1); |
@@ -4178,7 +4178,7 @@ discard block |
||
| 4178 | 4178 | $toMinify = array(); |
| 4179 | 4179 | $normal = array(); |
| 4180 | 4180 | |
| 4181 | - usort($context['css_files'], function ($a, $b) |
|
| 4181 | + usort($context['css_files'], function($a, $b) |
|
| 4182 | 4182 | { |
| 4183 | 4183 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
| 4184 | 4184 | }); |
@@ -5477,7 +5477,7 @@ discard block |
||
| 5477 | 5477 | { |
| 5478 | 5478 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
| 5479 | 5479 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
| 5480 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
| 5480 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
| 5481 | 5481 | if ($keep_alive) |
| 5482 | 5482 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
| 5483 | 5483 | else |
@@ -5487,7 +5487,7 @@ discard block |
||
| 5487 | 5487 | { |
| 5488 | 5488 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
| 5489 | 5489 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
| 5490 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
| 5490 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
| 5491 | 5491 | if ($keep_alive) |
| 5492 | 5492 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
| 5493 | 5493 | else |
@@ -5643,13 +5643,13 @@ discard block |
||
| 5643 | 5643 | |
| 5644 | 5644 | // UTF-8 occurences of MS special characters |
| 5645 | 5645 | $findchars_utf8 = array( |
| 5646 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
| 5647 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
| 5648 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
| 5649 | - "\xe2\x80\x98", // left single curly quote |
|
| 5650 | - "\xe2\x80\x99", // right single curly quote |
|
| 5651 | - "\xe2\x80\x9c", // left double curly quote |
|
| 5652 | - "\xe2\x80\x9d", // right double curly quote |
|
| 5646 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
| 5647 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
| 5648 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
| 5649 | + "\xe2\x80\x98", // left single curly quote |
|
| 5650 | + "\xe2\x80\x99", // right single curly quote |
|
| 5651 | + "\xe2\x80\x9c", // left double curly quote |
|
| 5652 | + "\xe2\x80\x9d", // right double curly quote |
|
| 5653 | 5653 | ); |
| 5654 | 5654 | |
| 5655 | 5655 | // windows 1252 / iso equivalents |
@@ -5665,13 +5665,13 @@ discard block |
||
| 5665 | 5665 | |
| 5666 | 5666 | // safe replacements |
| 5667 | 5667 | $replacechars = array( |
| 5668 | - ',', // ‚ |
|
| 5669 | - ',,', // „ |
|
| 5670 | - '...', // … |
|
| 5671 | - "'", // ‘ |
|
| 5672 | - "'", // ’ |
|
| 5673 | - '"', // “ |
|
| 5674 | - '"', // ” |
|
| 5668 | + ',', // ‚ |
|
| 5669 | + ',,', // „ |
|
| 5670 | + '...', // … |
|
| 5671 | + "'", // ‘ |
|
| 5672 | + "'", // ’ |
|
| 5673 | + '"', // “ |
|
| 5674 | + '"', // ” |
|
| 5675 | 5675 | ); |
| 5676 | 5676 | |
| 5677 | 5677 | if ($context['utf8']) |
@@ -6844,7 +6844,7 @@ discard block |
||
| 6844 | 6844 | EXISTS ( |
| 6845 | 6845 | SELECT bpv.id_board |
| 6846 | 6846 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
| 6847 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
| 6847 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
| 6848 | 6848 | AND bpv.deny = 0 |
| 6849 | 6849 | AND bpv.id_board = b.id_board |
| 6850 | 6850 | )'; |
@@ -6854,7 +6854,7 @@ discard block |
||
| 6854 | 6854 | AND NOT EXISTS ( |
| 6855 | 6855 | SELECT bpv.id_board |
| 6856 | 6856 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
| 6857 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
| 6857 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
| 6858 | 6858 | AND bpv.deny = 1 |
| 6859 | 6859 | AND bpv.id_board = b.id_board |
| 6860 | 6860 | )'; |
@@ -7125,8 +7125,8 @@ discard block |
||
| 7125 | 7125 | $i = 0; |
| 7126 | 7126 | while (empty($done)) |
| 7127 | 7127 | { |
| 7128 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
| 7129 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
| 7128 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
| 7129 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
| 7130 | 7130 | else |
| 7131 | 7131 | $done = true; |
| 7132 | 7132 | } |
@@ -7136,8 +7136,8 @@ discard block |
||
| 7136 | 7136 | $i = 0; |
| 7137 | 7137 | while (empty($done)) |
| 7138 | 7138 | { |
| 7139 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
| 7140 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
| 7139 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
| 7140 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
| 7141 | 7141 | else |
| 7142 | 7142 | $done = true; |
| 7143 | 7143 | } |
@@ -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"; |