@@ -807,7 +807,8 @@ |
||
807 | 807 | { |
808 | 808 | $context['spider_logs']['rows'][$k]['data']['viewing']['value'] = $txt[$new_url['label']]; |
809 | 809 | $context['spider_logs']['rows'][$k]['data']['viewing']['class'] = $new_url['class']; |
810 | - } else |
|
810 | + } |
|
811 | + else |
|
811 | 812 | $context['spider_logs']['rows'][$k]['data']['viewing']['value'] = $new_url; |
812 | 813 | } |
813 | 814 | } |
@@ -174,7 +174,8 @@ |
||
174 | 174 | } |
175 | 175 | } |
176 | 176 | |
177 | - $unnotified = array_filter($this->members['watching'], function ($member) { |
|
177 | + $unnotified = array_filter($this->members['watching'], function ($member) |
|
178 | + { |
|
178 | 179 | return empty($member['sent']); |
179 | 180 | }); |
180 | 181 |
@@ -64,8 +64,7 @@ discard block |
||
64 | 64 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
65 | 65 | && isset($_REQUEST['ajax']) |
66 | 66 | ) |
67 | - ) |
|
68 | - { |
|
67 | + ) { |
|
69 | 68 | $context['from_ajax'] = true; |
70 | 69 | $context['template_layers'] = array(); |
71 | 70 | } |
@@ -137,8 +136,7 @@ discard block |
||
137 | 136 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
138 | 137 | && isset($_REQUEST['ajax']) |
139 | 138 | ) |
140 | - ) |
|
141 | - { |
|
139 | + ) { |
|
142 | 140 | $context['from_ajax'] = true; |
143 | 141 | $context['template_layers'] = array(); |
144 | 142 | } |
@@ -517,8 +515,7 @@ discard block |
||
517 | 515 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
518 | 516 | && isset($_REQUEST['ajax']) |
519 | 517 | ) |
520 | - ) |
|
521 | - { |
|
518 | + ) { |
|
522 | 519 | $context['from_ajax'] = true; |
523 | 520 | $context['template_layers'] = array(); |
524 | 521 | } |
@@ -1234,7 +1234,8 @@ discard block |
||
1234 | 1234 | // It's important to do the numbered ones before the named ones, or messes happen. |
1235 | 1235 | uksort( |
1236 | 1236 | $substitutions, |
1237 | - function($a, $b) { |
|
1237 | + function($a, $b) |
|
1238 | + { |
|
1238 | 1239 | if (is_int($a) && is_int($b)) |
1239 | 1240 | return $a > $b ? 1 : ($a < $b ? -1 : 0); |
1240 | 1241 | elseif (is_int($a)) |
@@ -1774,8 +1775,12 @@ discard block |
||
1774 | 1775 | unset($mtime, $settingsFile, $settingsText); |
1775 | 1776 | $defined_vars = get_defined_vars(); |
1776 | 1777 | } |
1777 | - catch (Throwable $e) {} |
|
1778 | - catch (ErrorException $e) {} |
|
1778 | + catch (Throwable $e) |
|
1779 | + { |
|
1780 | +} |
|
1781 | + catch (ErrorException $e) |
|
1782 | + { |
|
1783 | +} |
|
1779 | 1784 | if (isset($e)) |
1780 | 1785 | return false; |
1781 | 1786 | |
@@ -1973,7 +1978,8 @@ discard block |
||
1973 | 1978 | { |
1974 | 1979 | list($id, $text) = $token; |
1975 | 1980 | |
1976 | - switch ($id) { |
|
1981 | + switch ($id) |
|
1982 | + { |
|
1977 | 1983 | case T_COMMENT: |
1978 | 1984 | case T_DOC_COMMENT: |
1979 | 1985 | end($parts); |
@@ -2310,7 +2316,8 @@ discard block |
||
2310 | 2316 | // Search for a working temp directory. |
2311 | 2317 | foreach ($temp_dir_options as $id_temp => $temp_option) |
2312 | 2318 | { |
2313 | - switch ($temp_option) { |
|
2319 | + switch ($temp_option) |
|
2320 | + { |
|
2314 | 2321 | case 'cachedir': |
2315 | 2322 | $possible_temp = rtrim($cachedir, '/'); |
2316 | 2323 | break; |
@@ -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'; |
@@ -2167,12 +2164,12 @@ discard block |
||
2167 | 2164 | 'tag' => 'cowsay', |
2168 | 2165 | 'parameters' => array( |
2169 | 2166 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2170 | - { |
|
2167 | + { |
|
2171 | 2168 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2172 | 2169 | }, |
2173 | 2170 | ), |
2174 | 2171 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2175 | - { |
|
2172 | + { |
|
2176 | 2173 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2177 | 2174 | }, |
2178 | 2175 | ), |
@@ -2500,7 +2497,8 @@ discard block |
||
2500 | 2497 | |
2501 | 2498 | foreach (array('path', 'query', 'fragment') as $part) |
2502 | 2499 | { |
2503 | - switch ($part) { |
|
2500 | + switch ($part) |
|
2501 | + { |
|
2504 | 2502 | case 'path': |
2505 | 2503 | $part_disallowed_chars = '\h\v<>' . $bracket_quote_chars . $excluded_trailing_chars . '/#&'; |
2506 | 2504 | $part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars); |
@@ -2817,7 +2815,9 @@ discard block |
||
2817 | 2815 | $look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2)); |
2818 | 2816 | |
2819 | 2817 | // A closing tag that doesn't match any open tags? Skip it. |
2820 | - if (!in_array($look_for, array_map(function($code) { return $code['tag']; }, $open_tags))) |
|
2818 | + if (!in_array($look_for, array_map(function($code) |
|
2819 | + { |
|
2820 | +return $code['tag']; }, $open_tags))) |
|
2821 | 2821 | continue; |
2822 | 2822 | |
2823 | 2823 | $to_close = array(); |
@@ -4357,7 +4357,6 @@ discard block |
||
4357 | 4357 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4358 | 4358 | $minSeed = $js_file['options']['seed']; |
4359 | 4359 | } |
4360 | - |
|
4361 | 4360 | else |
4362 | 4361 | { |
4363 | 4362 | echo ' |
@@ -6287,7 +6286,8 @@ discard block |
||
6287 | 6286 | $zones[$tzkey]['tzid'] = $tzid; |
6288 | 6287 | $zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0); |
6289 | 6288 | |
6290 | - foreach ($tzinfo as $transition) { |
|
6289 | + foreach ($tzinfo as $transition) |
|
6290 | + { |
|
6291 | 6291 | $zones[$tzkey]['abbrs'][] = $transition['abbr']; |
6292 | 6292 | } |
6293 | 6293 | |
@@ -6791,7 +6791,6 @@ discard block |
||
6791 | 6791 | $isWritable = true; |
6792 | 6792 | break; |
6793 | 6793 | } |
6794 | - |
|
6795 | 6794 | else |
6796 | 6795 | @chmod($file, $val); |
6797 | 6796 | } |
@@ -7880,7 +7879,8 @@ discard block |
||
7880 | 7879 | $replaceWith = array(); |
7881 | 7880 | |
7882 | 7881 | if (!empty($matches[1])) |
7883 | - foreach ($matches[1] as $token) { |
|
7882 | + foreach ($matches[1] as $token) |
|
7883 | + { |
|
7884 | 7884 | $toFind[] = '{' . $token . '}'; |
7885 | 7885 | $replaceWith[] = isset($txt[$token]) ? $txt[$token] : $token; |
7886 | 7886 | } |
@@ -1289,7 +1289,6 @@ |
||
1289 | 1289 | if (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages']) |
1290 | 1290 | $pages .= sprintf(strtr($settings['page_index']['page'], array('{URL}' => $scripturl . '?topic=' . $row['id_topic'] . '.0;all')), '', $txt['all']); |
1291 | 1291 | } |
1292 | - |
|
1293 | 1292 | else |
1294 | 1293 | $pages = ''; |
1295 | 1294 |
@@ -41,7 +41,8 @@ discard block |
||
41 | 41 | 'mysql' => array( |
42 | 42 | 'name' => 'MySQL', |
43 | 43 | 'version' => '5.6.0', |
44 | - 'version_check' => function() { |
|
44 | + 'version_check' => function() |
|
45 | + { |
|
45 | 46 | global $db_connection; |
46 | 47 | if (!function_exists('mysqli_fetch_row')) |
47 | 48 | return false; |
@@ -52,7 +53,8 @@ discard block |
||
52 | 53 | 'postgresql' => array( |
53 | 54 | 'name' => 'PostgreSQL', |
54 | 55 | 'version' => '9.6', |
55 | - 'version_check' => function() { |
|
56 | + 'version_check' => function() |
|
57 | + { |
|
56 | 58 | if (!function_exists('pg_version')) |
57 | 59 | return false; |
58 | 60 | $version = pg_version(); |
@@ -2214,7 +2214,6 @@ |
||
2214 | 2214 | $hookData['pureFunc'] = $hookData['method']; |
2215 | 2215 | $hookData['call'] = $modFunc; |
2216 | 2216 | } |
2217 | - |
|
2218 | 2217 | else |
2219 | 2218 | $hookData['call'] = $hookData['pureFunc'] = $modFunc; |
2220 | 2219 |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | // Set a list of common functions. |
108 | 108 | $ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);'; |
109 | 109 | $ent_check = empty($modSettings['disableEntityCheck']) ? function($string) |
110 | - { |
|
110 | + { |
|
111 | 111 | $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string); |
112 | 112 | return $string; |
113 | 113 | } : function($string) |
@@ -2422,7 +2422,6 @@ discard block |
||
2422 | 2422 | loadLanguage('index+Modifications'); |
2423 | 2423 | $context['template_layers'] = array(); |
2424 | 2424 | } |
2425 | - |
|
2426 | 2425 | else |
2427 | 2426 | { |
2428 | 2427 | // Custom templates to load, or just default? |