@@ -1997,7 +1997,9 @@ |
||
| 1997 | 1997 | // Remove anything that isn't actually new from our list of files |
| 1998 | 1998 | foreach ($to_unset as $key => $ids) |
| 1999 | 1999 | { |
| 2000 | - if (array_reduce($ids, function ($carry, $item) { return $carry * $item; }, true) == true) |
|
| 2000 | + if (array_reduce($ids, function ($carry, $item) |
|
| 2001 | + { |
|
| 2002 | +return $carry * $item; }, true) == true) |
|
| 2001 | 2003 | unset($smiley_files[$key]); |
| 2002 | 2004 | } |
| 2003 | 2005 | |
@@ -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 | } |
@@ -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 | } |
@@ -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 | |
@@ -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">' . |
@@ -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 | } |
@@ -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; |