@@ -93,7 +93,6 @@ |
||
93 | 93 | if ($ts <= 0 || $ts % 15 != 0 || time() - $ts < 0 || time() - $ts > 20) |
94 | 94 | obExit_cron(); |
95 | 95 | } |
96 | - |
|
97 | 96 | else |
98 | 97 | $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0'; |
99 | 98 |
@@ -707,7 +707,6 @@ |
||
707 | 707 | $cache_level = array($txt['cache_off']); |
708 | 708 | $apis_names['none'] = $txt['cache_off']; |
709 | 709 | } |
710 | - |
|
711 | 710 | else |
712 | 711 | { |
713 | 712 | $txt['cache_settings_message'] = '<strong class="success">' . |
@@ -163,7 +163,8 @@ |
||
163 | 163 | else |
164 | 164 | $context['help_text'] = $_GET['help']; |
165 | 165 | |
166 | - switch ($_GET['help']) { |
|
166 | + switch ($_GET['help']) |
|
167 | + { |
|
167 | 168 | case 'cal_short_months': |
168 | 169 | $context['help_text'] = sprintf($context['help_text'], $txt['months_short'][1], $txt['months_titles'][1]); |
169 | 170 | break; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | // Set a list of common functions. |
105 | 105 | $ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);'; |
106 | 106 | $ent_check = empty($modSettings['disableEntityCheck']) ? function($string) |
107 | - { |
|
107 | + { |
|
108 | 108 | $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string); |
109 | 109 | return $string; |
110 | 110 | } : function($string) |
@@ -929,7 +929,6 @@ discard block |
||
929 | 929 | $user_info_min[$row['id_member']]['time_offset'] = ($tz_user->getOffset($time_user) - |
930 | 930 | $tz_system->getOffset($time_system)) / 3600; |
931 | 931 | } |
932 | - |
|
933 | 932 | else |
934 | 933 | $user_info_min[$row['id_member']]['time_offset'] = empty($row['time_offset']) ? 0 : $row['time_offset']; |
935 | 934 | } |
@@ -1657,7 +1656,6 @@ discard block |
||
1657 | 1656 | $time_user = new DateTime('now', $tz_user); |
1658 | 1657 | $profile['time_offset'] = ($tz_user->getOffset($time_user) - $tz_system->getOffset($time_system)) / 3600; |
1659 | 1658 | } |
1660 | - |
|
1661 | 1659 | else |
1662 | 1660 | { |
1663 | 1661 | // !!! Compatibility. |
@@ -2322,7 +2320,6 @@ discard block |
||
2322 | 2320 | loadLanguage('index+Modifications'); |
2323 | 2321 | $context['template_layers'] = array(); |
2324 | 2322 | } |
2325 | - |
|
2326 | 2323 | else |
2327 | 2324 | { |
2328 | 2325 | // Custom templates to load, or just default? |
@@ -280,7 +280,6 @@ discard block |
||
280 | 280 | $this_category[$row_board['id_board']]['board_class'] = 'on'; |
281 | 281 | $this_category[$row_board['id_board']]['board_tooltip'] = $txt['new_posts']; |
282 | 282 | } |
283 | - |
|
284 | 283 | else |
285 | 284 | { |
286 | 285 | $this_category[$row_board['id_board']]['board_tooltip'] = $txt['old_posts']; |
@@ -415,7 +414,6 @@ discard block |
||
415 | 414 | $this_last_post['href'] = $scripturl . '?topic=' . $row_board['id_topic'] . '.msg' . ($user_info['is_guest'] ? $row_board['id_msg'] : $row_board['new_from']) . (empty($row_board['is_read']) ? ';boardseen' : '') . '#new'; |
416 | 415 | $this_last_post['link'] = '<a href="' . $this_last_post['href'] . '" title="' . $row_board['subject'] . '">' . $row_board['short_subject'] . '</a>'; |
417 | 416 | } |
418 | - |
|
419 | 417 | else |
420 | 418 | { |
421 | 419 | $this_last_post['href'] = ''; |
@@ -510,8 +508,7 @@ discard block |
||
510 | 508 | $board['last_post']['last_post_message'] = sprintf($txt['last_post_message'], $board['last_post']['member']['link'], $board['last_post']['link'], $board['last_post']['time'] > 0 ? timeformat($board['last_post']['time']) : $txt['not_applicable']); |
511 | 509 | } |
512 | 510 | } |
513 | - |
|
514 | - else |
|
511 | + else |
|
515 | 512 | foreach ($this_category as &$board) |
516 | 513 | { |
517 | 514 | if (isset($boards_parsed_data_by_cat_id[$board['id_cat']][$board['id']])) |
@@ -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; |