@@ -869,7 +869,6 @@ |
||
| 869 | 869 | $can_approve_boards = boardsAllowedTo('approve_posts'); |
| 870 | 870 | $onlyApproved = $can_approve_boards !== array(0) && !in_array($_REQUEST['targetboard'], $can_approve_boards); |
| 871 | 871 | } |
| 872 | - |
|
| 873 | 872 | else |
| 874 | 873 | $onlyApproved = false; |
| 875 | 874 | |
@@ -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'; |
@@ -2162,7 +2159,7 @@ discard block |
||
| 2162 | 2159 | 'tag' => 'cowsay', |
| 2163 | 2160 | 'parameters' => array( |
| 2164 | 2161 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
| 2165 | - { |
|
| 2162 | + { |
|
| 2166 | 2163 | static $css_added; |
| 2167 | 2164 | |
| 2168 | 2165 | if (empty($css_added)) |
@@ -2179,7 +2176,7 @@ discard block |
||
| 2179 | 2176 | }, |
| 2180 | 2177 | ), |
| 2181 | 2178 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
| 2182 | - { |
|
| 2179 | + { |
|
| 2183 | 2180 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
| 2184 | 2181 | }, |
| 2185 | 2182 | ), |
@@ -3277,7 +3274,7 @@ discard block |
||
| 3277 | 3274 | |
| 3278 | 3275 | // Replace away! |
| 3279 | 3276 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
| 3280 | - { |
|
| 3277 | + { |
|
| 3281 | 3278 | return $smileyPregReplacements[$matches[1]]; |
| 3282 | 3279 | }, $message); |
| 3283 | 3280 | } |
@@ -4075,7 +4072,6 @@ discard block |
||
| 4075 | 4072 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
| 4076 | 4073 | $minSeed = $js_file['options']['seed']; |
| 4077 | 4074 | } |
| 4078 | - |
|
| 4079 | 4075 | else |
| 4080 | 4076 | { |
| 4081 | 4077 | echo ' |
@@ -6350,7 +6346,6 @@ discard block |
||
| 6350 | 6346 | $isWritable = true; |
| 6351 | 6347 | break; |
| 6352 | 6348 | } |
| 6353 | - |
|
| 6354 | 6349 | else |
| 6355 | 6350 | @chmod($file, $val); |
| 6356 | 6351 | } |
@@ -7282,7 +7277,6 @@ discard block |
||
| 7282 | 7277 | |
| 7283 | 7278 | $length += array_length($value, $deep_count); |
| 7284 | 7279 | } |
| 7285 | - |
|
| 7286 | 7280 | else |
| 7287 | 7281 | $length += strlen($value); |
| 7288 | 7282 | } |
@@ -1213,7 +1213,8 @@ discard block |
||
| 1213 | 1213 | } |
| 1214 | 1214 | |
| 1215 | 1215 | // It's important to do the numbered ones before the named ones, or messes happen. |
| 1216 | - uksort($substitutions, function($a, $b) { |
|
| 1216 | + uksort($substitutions, function($a, $b) |
|
| 1217 | + { |
|
| 1217 | 1218 | if (is_int($a) && is_int($b)) |
| 1218 | 1219 | return $a > $b; |
| 1219 | 1220 | elseif (is_int($a)) |
@@ -1752,8 +1753,12 @@ discard block |
||
| 1752 | 1753 | unset($mtime, $settingsFile, $settingsText); |
| 1753 | 1754 | $defined_vars = get_defined_vars(); |
| 1754 | 1755 | } |
| 1755 | - catch (Throwable $e) {} |
|
| 1756 | - catch (ErrorException $e) {} |
|
| 1756 | + catch (Throwable $e) |
|
| 1757 | + { |
|
| 1758 | +} |
|
| 1759 | + catch (ErrorException $e) |
|
| 1760 | + { |
|
| 1761 | +} |
|
| 1757 | 1762 | if (isset($e)) |
| 1758 | 1763 | return false; |
| 1759 | 1764 | |
@@ -1913,7 +1918,8 @@ discard block |
||
| 1913 | 1918 | // For the same reason, replace literal returns and newlines with "\r" and "\n" |
| 1914 | 1919 | elseif (is_string($var) && (strpos($var, "\n") !== false || strpos($var, "\r") !== false)) |
| 1915 | 1920 | { |
| 1916 | - return strtr(preg_replace_callback('/[\r\n]+/', function($m) { |
|
| 1921 | + return strtr(preg_replace_callback('/[\r\n]+/', function($m) |
|
| 1922 | + { |
|
| 1917 | 1923 | return '\' . "' . strtr($m[0], array("\r" => '\r', "\n" => '\n')) . '" . \''; |
| 1918 | 1924 | }, $var), array("'' . " => '', " . ''" => '')); |
| 1919 | 1925 | } |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | log_error(sprintf($txt['smiley_set_dir_not_found'], $set_names[array_search($set, $context['smiley_sets'])])); |
| 501 | 501 | |
| 502 | 502 | $context['smiley_sets'] = array_filter($context['smiley_sets'], function($v) use ($set) |
| 503 | - { |
|
| 503 | + { |
|
| 504 | 504 | return $v != $set; |
| 505 | 505 | }); |
| 506 | 506 | } |
@@ -3496,7 +3496,6 @@ discard block |
||
| 3496 | 3496 | } |
| 3497 | 3497 | } |
| 3498 | 3498 | } |
| 3499 | - |
|
| 3500 | 3499 | elseif (($value == 'upload' && allowedTo('profile_upload_avatar')) || $downloadedExternalAvatar) |
| 3501 | 3500 | { |
| 3502 | 3501 | if ((isset($_FILES['attachment']['name']) && $_FILES['attachment']['name'] != '') || $downloadedExternalAvatar) |
@@ -926,7 +926,8 @@ discard block |
||
| 926 | 926 | $error_array[2] = null; |
| 927 | 927 | |
| 928 | 928 | if(empty($db_persist)) |
| 929 | - { // without pooling |
|
| 929 | + { |
|
| 930 | +// without pooling |
|
| 930 | 931 | if (empty($pg_error_data_prep)) |
| 931 | 932 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
| 932 | 933 | 'INSERT INTO ' . $db_prefix . 'log_errors |
@@ -937,7 +938,8 @@ discard block |
||
| 937 | 938 | pg_execute($db_connection, 'smf_log_errors', $error_array); |
| 938 | 939 | } |
| 939 | 940 | else |
| 940 | - { //with pooling |
|
| 941 | + { |
|
| 942 | +//with pooling |
|
| 941 | 943 | $pg_error_data_prep = pg_prepare($db_connection, '', |
| 942 | 944 | 'INSERT INTO ' . $db_prefix . 'log_errors |
| 943 | 945 | (id_member, log_time, ip, url, message, session, error_type, file, line, backtrace) |