@@ -979,7 +979,8 @@ discard block |
||
979 | 979 | $error_array[2] = null; |
980 | 980 | |
981 | 981 | if(empty($db_persist)) |
982 | - { // without pooling |
|
982 | + { |
|
983 | +// without pooling |
|
983 | 984 | if (empty($pg_error_data_prep)) |
984 | 985 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
985 | 986 | 'INSERT INTO ' . $db_prefix . 'log_errors |
@@ -990,7 +991,8 @@ discard block |
||
990 | 991 | pg_execute($db_connection, 'smf_log_errors', $error_array); |
991 | 992 | } |
992 | 993 | else |
993 | - { //with pooling |
|
994 | + { |
|
995 | +//with pooling |
|
994 | 996 | $pg_error_data_prep = pg_prepare($db_connection, '', |
995 | 997 | 'INSERT INTO ' . $db_prefix . 'log_errors |
996 | 998 | (id_member, log_time, ip, url, message, session, error_type, file, line, backtrace) |
@@ -280,7 +280,6 @@ discard block |
||
280 | 280 | $condition = 'id_member IN ({array_int:members})'; |
281 | 281 | $parameters['members'] = $members; |
282 | 282 | } |
283 | - |
|
284 | 283 | elseif ($members === null) |
285 | 284 | $condition = '1=1'; |
286 | 285 | |
@@ -383,11 +382,9 @@ discard block |
||
383 | 382 | $val = $val . ' END'; |
384 | 383 | $type = 'raw'; |
385 | 384 | } |
386 | - |
|
387 | 385 | else |
388 | 386 | $val = alert_count($members, true); |
389 | 387 | } |
390 | - |
|
391 | 388 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
392 | 389 | { |
393 | 390 | $val = $var . ' ' . $val . ' 1'; |
@@ -2160,12 +2157,12 @@ discard block |
||
2160 | 2157 | 'tag' => 'cowsay', |
2161 | 2158 | 'parameters' => array( |
2162 | 2159 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2163 | - { |
|
2160 | + { |
|
2164 | 2161 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2165 | 2162 | }, |
2166 | 2163 | ), |
2167 | 2164 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2168 | - { |
|
2165 | + { |
|
2169 | 2166 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2170 | 2167 | }, |
2171 | 2168 | ), |
@@ -2494,7 +2491,8 @@ discard block |
||
2494 | 2491 | |
2495 | 2492 | foreach (array('path', 'query', 'fragment') as $part) |
2496 | 2493 | { |
2497 | - switch ($part) { |
|
2494 | + switch ($part) |
|
2495 | + { |
|
2498 | 2496 | case 'path': |
2499 | 2497 | $part_disallowed_chars = '<>' . $bracket_quote_chars . $space_chars . $excluded_trailing_chars . '/#&'; |
2500 | 2498 | $part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars); |
@@ -2807,7 +2805,9 @@ discard block |
||
2807 | 2805 | $look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2)); |
2808 | 2806 | |
2809 | 2807 | // A closing tag that doesn't match any open tags? Skip it. |
2810 | - if (!in_array($look_for, array_map(function($code) { return $code['tag']; }, $open_tags))) |
|
2808 | + if (!in_array($look_for, array_map(function($code) |
|
2809 | + { |
|
2810 | +return $code['tag']; }, $open_tags))) |
|
2811 | 2811 | continue; |
2812 | 2812 | |
2813 | 2813 | $to_close = array(); |
@@ -3537,7 +3537,7 @@ discard block |
||
3537 | 3537 | |
3538 | 3538 | // Replace away! |
3539 | 3539 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
3540 | - { |
|
3540 | + { |
|
3541 | 3541 | return $smileyPregReplacements[$matches[1]]; |
3542 | 3542 | }, $message); |
3543 | 3543 | } |
@@ -4348,7 +4348,6 @@ discard block |
||
4348 | 4348 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4349 | 4349 | $minSeed = $js_file['options']['seed']; |
4350 | 4350 | } |
4351 | - |
|
4352 | 4351 | else |
4353 | 4352 | { |
4354 | 4353 | echo ' |
@@ -6274,7 +6273,8 @@ discard block |
||
6274 | 6273 | $zones[$tzkey]['tzid'] = $tzid; |
6275 | 6274 | $zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0); |
6276 | 6275 | |
6277 | - foreach ($tzinfo as $transition) { |
|
6276 | + foreach ($tzinfo as $transition) |
|
6277 | + { |
|
6278 | 6278 | $zones[$tzkey]['abbrs'][] = $transition['abbr']; |
6279 | 6279 | } |
6280 | 6280 | |
@@ -6359,7 +6359,8 @@ discard block |
||
6359 | 6359 | $desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : ''); |
6360 | 6360 | |
6361 | 6361 | // We don't want abbreviations like '+03' or '-11'. |
6362 | - $abbrs = array_filter($tzvalue['abbrs'], function ($abbr) { |
|
6362 | + $abbrs = array_filter($tzvalue['abbrs'], function ($abbr) |
|
6363 | + { |
|
6363 | 6364 | return !strspn($abbr, '+-'); |
6364 | 6365 | }); |
6365 | 6366 | $abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array(); |
@@ -6760,7 +6761,6 @@ discard block |
||
6760 | 6761 | $isWritable = true; |
6761 | 6762 | break; |
6762 | 6763 | } |
6763 | - |
|
6764 | 6764 | else |
6765 | 6765 | @chmod($file, $val); |
6766 | 6766 | } |