@@ -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 | |
@@ -266,7 +266,6 @@ |
||
| 266 | 266 | $user_info = $real_user_info; |
| 267 | 267 | unset($real_user_info); |
| 268 | 268 | } |
| 269 | - |
|
| 270 | 269 | else |
| 271 | 270 | $user_info = null; |
| 272 | 271 | |
@@ -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 | } |
@@ -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 | } |
@@ -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'; |
@@ -2163,12 +2160,12 @@ discard block |
||
| 2163 | 2160 | 'tag' => 'cowsay', |
| 2164 | 2161 | 'parameters' => array( |
| 2165 | 2162 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
| 2166 | - { |
|
| 2163 | + { |
|
| 2167 | 2164 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
| 2168 | 2165 | }, |
| 2169 | 2166 | ), |
| 2170 | 2167 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
| 2171 | - { |
|
| 2168 | + { |
|
| 2172 | 2169 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
| 2173 | 2170 | }, |
| 2174 | 2171 | ), |
@@ -2497,7 +2494,8 @@ discard block |
||
| 2497 | 2494 | |
| 2498 | 2495 | foreach (array('path', 'query', 'fragment') as $part) |
| 2499 | 2496 | { |
| 2500 | - switch ($part) { |
|
| 2497 | + switch ($part) |
|
| 2498 | + { |
|
| 2501 | 2499 | case 'path': |
| 2502 | 2500 | $part_disallowed_chars = '<>' . $bracket_quote_chars . $space_chars . $excluded_trailing_chars . '/#&'; |
| 2503 | 2501 | $part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars); |
@@ -2814,7 +2812,9 @@ discard block |
||
| 2814 | 2812 | $look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2)); |
| 2815 | 2813 | |
| 2816 | 2814 | // A closing tag that doesn't match any open tags? Skip it. |
| 2817 | - if (!in_array($look_for, array_map(function($code) { return $code['tag']; }, $open_tags))) |
|
| 2815 | + if (!in_array($look_for, array_map(function($code) |
|
| 2816 | + { |
|
| 2817 | +return $code['tag']; }, $open_tags))) |
|
| 2818 | 2818 | continue; |
| 2819 | 2819 | |
| 2820 | 2820 | $to_close = array(); |
@@ -4365,7 +4365,6 @@ discard block |
||
| 4365 | 4365 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
| 4366 | 4366 | $minSeed = $js_file['options']['seed']; |
| 4367 | 4367 | } |
| 4368 | - |
|
| 4369 | 4368 | else |
| 4370 | 4369 | { |
| 4371 | 4370 | echo ' |
@@ -6295,7 +6294,8 @@ discard block |
||
| 6295 | 6294 | $zones[$tzkey]['tzid'] = $tzid; |
| 6296 | 6295 | $zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0); |
| 6297 | 6296 | |
| 6298 | - foreach ($tzinfo as $transition) { |
|
| 6297 | + foreach ($tzinfo as $transition) |
|
| 6298 | + { |
|
| 6299 | 6299 | $zones[$tzkey]['abbrs'][] = $transition['abbr']; |
| 6300 | 6300 | } |
| 6301 | 6301 | |
@@ -6785,7 +6785,6 @@ discard block |
||
| 6785 | 6785 | $isWritable = true; |
| 6786 | 6786 | break; |
| 6787 | 6787 | } |
| 6788 | - |
|
| 6789 | 6788 | else |
| 6790 | 6789 | @chmod($file, $val); |
| 6791 | 6790 | } |