@@ -1730,10 +1730,13 @@ |
||
| 1730 | 1730 | if ($result[0] === 127 // Valid Response |
| 1731 | 1731 | && ($result[3] & 3 || $result[3] & 5) // Listed as Suspicious + Harvester || Suspicious + Comment Spammer |
| 1732 | 1732 | && $result[2] >= $modSettings['badbehavior_httpbl_threat'] // Level |
| 1733 | - && $result[1] <= $modSettings['badbehavior_httpbl_maxage']) // Age |
|
| 1733 | + && $result[1] <= $modSettings['badbehavior_httpbl_maxage']) |
|
| 1734 | + { |
|
| 1735 | + // Age |
|
| 1734 | 1736 | { |
| 1735 | 1737 | return true; |
| 1736 | 1738 | } |
| 1739 | + } |
|
| 1737 | 1740 | } |
| 1738 | 1741 | |
| 1739 | 1742 | return false; |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | (' . implode(' OR ', $ban_query) . ')', |
| 349 | 349 | $ban_query_vars |
| 350 | 350 | )->fetch_callback( |
| 351 | - static function ($row) use ($restrictions, &$flag_is_activated) { |
|
| 351 | + static function($row) use ($restrictions, &$flag_is_activated) { |
|
| 352 | 352 | // Store every type of ban that applies to you in your session. |
| 353 | 353 | foreach ($restrictions as $restriction) |
| 354 | 354 | { |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | 'current_time' => time(), |
| 411 | 411 | ] |
| 412 | 412 | )->fetch_callback( |
| 413 | - static function ($row) { |
|
| 413 | + static function($row) { |
|
| 414 | 414 | $_SESSION['ban']['cannot_access']['ids'][] = $row['id_ban']; |
| 415 | 415 | $_SESSION['ban']['cannot_access']['reason'] = $row['reason']; |
| 416 | 416 | } |
@@ -704,7 +704,7 @@ discard block |
||
| 704 | 704 | 'now' => time(), |
| 705 | 705 | ] |
| 706 | 706 | )->fetch_callback( |
| 707 | - static function ($row) use (&$ban_ids, &$ban_reason, $restriction) { |
|
| 707 | + static function($row) use (&$ban_ids, &$ban_reason, $restriction) { |
|
| 708 | 708 | if (!empty($row['cannot_access'])) |
| 709 | 709 | { |
| 710 | 710 | $_SESSION['ban']['cannot_access']['ids'][] = $row['id_ban']; |
@@ -829,7 +829,7 @@ discard block |
||
| 829 | 829 | // If global cookies are on, trim to superdomain AFTER IDNA normalization. |
| 830 | 830 | if (!empty($modSettings['globalCookies'])) |
| 831 | 831 | { |
| 832 | - $trim = static function (string $h): string { |
|
| 832 | + $trim = static function(string $h): string { |
|
| 833 | 833 | if (preg_match('~(?:[^.]+\.)?([^.]{3,}\..+)\z~i', $h, $parts) === 1) |
| 834 | 834 | { |
| 835 | 835 | return $parts[1]; |
@@ -1344,7 +1344,7 @@ discard block |
||
| 1344 | 1344 | 'permissions' => $permissions, |
| 1345 | 1345 | ] |
| 1346 | 1346 | )->fetch_callback( |
| 1347 | - static function ($row) use ($simple, &$deny_boards, &$boards) { |
|
| 1347 | + static function($row) use ($simple, &$deny_boards, &$boards) { |
|
| 1348 | 1348 | if ($simple) |
| 1349 | 1349 | { |
| 1350 | 1350 | if (empty($row['add_deny'])) |
@@ -1377,11 +1377,13 @@ |
||
| 1377 | 1377 | { |
| 1378 | 1378 | // If we revert to the old id-group we need to ensure it wasn't from a subscription. |
| 1379 | 1379 | foreach ($context['subscriptions'] as $id => $group) |
| 1380 | - // It was? Make them a regular member then! |
|
| 1380 | + { |
|
| 1381 | + // It was? Make them a regular member then! |
|
| 1381 | 1382 | { |
| 1382 | 1383 | if ($group['prim_group'] == $member['id_group']) |
| 1383 | 1384 | { |
| 1384 | 1385 | $member['id_group'] = 0; |
| 1386 | + } |
|
| 1385 | 1387 | } |
| 1386 | 1388 | } |
| 1387 | 1389 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | 'guest' => $txt['guest'], |
| 91 | 91 | ]) |
| 92 | 92 | )->fetch_callback( |
| 93 | - function ($row) use (&$subscribers) { |
|
| 93 | + function($row) use (&$subscribers) { |
|
| 94 | 94 | global $txt; |
| 95 | 95 | |
| 96 | 96 | $subscribers[] = [ |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | 'current_time' => time(), |
| 150 | 150 | ] |
| 151 | 151 | )->fetch_callback( |
| 152 | - function ($row) use (&$groups) { |
|
| 152 | + function($row) use (&$groups) { |
|
| 153 | 153 | // Specific primary group? |
| 154 | 154 | if ($row['id_group'] != 0) |
| 155 | 155 | { |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | FROM {db_prefix}subscriptions', |
| 486 | 486 | [] |
| 487 | 487 | )->fetch_callback( |
| 488 | - function ($row) { |
|
| 488 | + function($row) { |
|
| 489 | 489 | global $context, $modSettings, $txt; |
| 490 | 490 | |
| 491 | 491 | // Pick a cost. |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | GROUP BY id_subscribe, status', |
| 556 | 556 | [] |
| 557 | 557 | )->fetch_callback( |
| 558 | - function ($row) { |
|
| 558 | + function($row) { |
|
| 559 | 559 | global $context; |
| 560 | 560 | |
| 561 | 561 | $ind = $row['status'] == 0 ? 'finished' : 'total'; |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | GROUP BY id_subscribe', |
| 576 | 576 | [] |
| 577 | 577 | )->fetch_callback( |
| 578 | - function ($row) { |
|
| 578 | + function($row) { |
|
| 579 | 579 | global $context; |
| 580 | 580 | |
| 581 | 581 | if (isset($context['subscriptions'][$row['id_subscribe']])) |
@@ -609,7 +609,7 @@ discard block |
||
| 609 | 609 | 'selected_member' => $memID, |
| 610 | 610 | ] |
| 611 | 611 | )->fetch_callback( |
| 612 | - function ($row) use (&$current, $active_subscriptions) { |
|
| 612 | + function($row) use (&$current, $active_subscriptions) { |
|
| 613 | 613 | global $txt; |
| 614 | 614 | |
| 615 | 615 | // The subscription must exist! |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | 'guest' => $txt['guest'], |
| 671 | 671 | ] |
| 672 | 672 | )->fetch_callback( |
| 673 | - function ($row) use (&$members) { |
|
| 673 | + function($row) use (&$members) { |
|
| 674 | 674 | $members[$row['id_member']] = $row; |
| 675 | 675 | } |
| 676 | 676 | ); |
@@ -883,7 +883,7 @@ discard block |
||
| 883 | 883 | 'current_subscription' => $sub_id, |
| 884 | 884 | ] |
| 885 | 885 | )->fetch_callback( |
| 886 | - function ($row) use (&$subscription) { |
|
| 886 | + function($row) use (&$subscription) { |
|
| 887 | 887 | // Sort the date. |
| 888 | 888 | preg_match('~(\d*)(\w)~', $row['length'], $match); |
| 889 | 889 | if (isset($match[2])) |
@@ -1111,7 +1111,7 @@ discard block |
||
| 1111 | 1111 | 'subscription_list' => $toDelete, |
| 1112 | 1112 | ] |
| 1113 | 1113 | )->fetch_callback( |
| 1114 | - function ($row) use (&$delete) { |
|
| 1114 | + function($row) use (&$delete) { |
|
| 1115 | 1115 | $delete[$row['id_subscribe']] = $row['id_member']; |
| 1116 | 1116 | } |
| 1117 | 1117 | ); |
@@ -1321,7 +1321,7 @@ discard block |
||
| 1321 | 1321 | 'is_active' => 1, |
| 1322 | 1322 | ] |
| 1323 | 1323 | )->fetch_callback( |
| 1324 | - function ($row) use (&$removals, &$allowed, &$member, &$new_id_group, $id_subscribe) { |
|
| 1324 | + function($row) use (&$removals, &$allowed, &$member, &$new_id_group, $id_subscribe) { |
|
| 1325 | 1325 | global $context; |
| 1326 | 1326 | |
| 1327 | 1327 | if (!isset($context['subscriptions'][$row['id_subscribe']])) |
@@ -735,10 +735,12 @@ |
||
| 735 | 735 | } |
| 736 | 736 | // If this is being unapproved, and it's equal to the id_last_msg we need to find a new one! |
| 737 | 737 | elseif (!$approve) |
| 738 | - // Default to the first message and then we'll override in a bit ;) |
|
| 738 | + { |
|
| 739 | + // Default to the first message and then we'll override in a bit ;) |
|
| 739 | 740 | { |
| 740 | 741 | $topic_changes[$row['id_topic']]['id_last_msg'] = $row['id_first_msg']; |
| 741 | 742 | } |
| 743 | + } |
|
| 742 | 744 | |
| 743 | 745 | $topic_changes[$row['id_topic']]['unapproved_posts'] += $approve ? -1 : 1; |
| 744 | 746 | $board_changes[$row['id_board']]['unapproved_posts'] += $approve ? -1 : 1; |
@@ -785,7 +785,7 @@ discard block |
||
| 785 | 785 | 'approved' => 1, |
| 786 | 786 | ] |
| 787 | 787 | )->fetch_callback( |
| 788 | - function ($row) use (&$topic_changes) { |
|
| 788 | + function($row) use (&$topic_changes) { |
|
| 789 | 789 | $topic_changes[$row['id_topic']]['id_last_msg'] = $row['id_last_msg']; |
| 790 | 790 | } |
| 791 | 791 | ); |
@@ -947,7 +947,7 @@ discard block |
||
| 947 | 947 | 'approved' => 1, |
| 948 | 948 | ] |
| 949 | 949 | )->fetch_callback( |
| 950 | - function ($row) use (&$lastMsg) { |
|
| 950 | + function($row) use (&$lastMsg) { |
|
| 951 | 951 | $lastMsg[$row['id_board']] = $row['id_msg']; |
| 952 | 952 | } |
| 953 | 953 | ); |
@@ -306,8 +306,7 @@ |
||
| 306 | 306 | class_exists($modSettings['front_page']) |
| 307 | 307 | && in_array('validateFrontPageOptions', get_class_methods($modSettings['front_page'])) |
| 308 | 308 | && !$front_page::validateFrontPageOptions($this->_req->post) |
| 309 | - ) |
|
| 310 | - { |
|
| 309 | + ) { |
|
| 311 | 310 | $this->_req->post->front_page = ''; |
| 312 | 311 | } |
| 313 | 312 | } |
@@ -1128,7 +1128,7 @@ discard block |
||
| 1128 | 1128 | 'class' => 'centertext', |
| 1129 | 1129 | ], |
| 1130 | 1130 | 'data' => [ |
| 1131 | - 'function' => static function ($rowData) { |
|
| 1131 | + 'function' => static function($rowData) { |
|
| 1132 | 1132 | $isChecked = $rowData['disabled'] ? '' : ' checked="checked"'; |
| 1133 | 1133 | $onClickHandler = $rowData['can_show_register'] ? sprintf('onclick="document.getElementById(\'reg_%1$s\').disabled = !this.checked;"', $rowData['id']) : ''; |
| 1134 | 1134 | |
@@ -1144,7 +1144,7 @@ discard block |
||
| 1144 | 1144 | 'class' => 'centertext', |
| 1145 | 1145 | ], |
| 1146 | 1146 | 'data' => [ |
| 1147 | - 'function' => static function ($rowData) { |
|
| 1147 | + 'function' => static function($rowData) { |
|
| 1148 | 1148 | $isChecked = $rowData['on_register'] && !$rowData['disabled'] ? ' checked="checked"' : ''; |
| 1149 | 1149 | $isDisabled = $rowData['can_show_register'] ? '' : ' disabled="disabled"'; |
| 1150 | 1150 | |
@@ -1220,7 +1220,7 @@ discard block |
||
| 1220 | 1220 | 'value' => $txt['custom_profile_fieldtype'], |
| 1221 | 1221 | ], |
| 1222 | 1222 | 'data' => [ |
| 1223 | - 'function' => static function ($rowData) { |
|
| 1223 | + 'function' => static function($rowData) { |
|
| 1224 | 1224 | global $txt; |
| 1225 | 1225 | |
| 1226 | 1226 | $textKey = sprintf('custom_profile_type_%1$s', $rowData['field_type']); |
@@ -1240,7 +1240,7 @@ discard block |
||
| 1240 | 1240 | 'class' => 'centertext', |
| 1241 | 1241 | ], |
| 1242 | 1242 | 'data' => [ |
| 1243 | - 'function' => static function ($rowData) { |
|
| 1243 | + 'function' => static function($rowData) { |
|
| 1244 | 1244 | $isChecked = $rowData['active'] === '1' ? ' checked="checked"' : ''; |
| 1245 | 1245 | |
| 1246 | 1246 | return sprintf('<input type="checkbox" name="cust[]" id="cust_%1$s" value="%1$s" class="input_check"%2$s />', $rowData['id_field'], $isChecked); |
@@ -1258,7 +1258,7 @@ discard block |
||
| 1258 | 1258 | 'value' => $txt['custom_profile_placement'], |
| 1259 | 1259 | ], |
| 1260 | 1260 | 'data' => [ |
| 1261 | - 'function' => static function ($rowData) { |
|
| 1261 | + 'function' => static function($rowData) { |
|
| 1262 | 1262 | global $txt; |
| 1263 | 1263 | |
| 1264 | 1264 | $placement = 'custom_profile_placement_'; |
@@ -213,7 +213,7 @@ |
||
| 213 | 213 | <<<'MSG' |
| 214 | 214 | PHP Fatal error: Uncaught exception '%s' with message '%s' in %s:%s<br /> |
| 215 | 215 | Stack trace:<br />%s<br /> thrown in %s on line %s |
| 216 | -MSG; |
|
| 216 | +msg; |
|
| 217 | 217 | |
| 218 | 218 | // write trace lines into main template |
| 219 | 219 | return sprintf( |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | |
| 52 | 52 | // Register the class handlers to the PHP handler functions |
| 53 | 53 | set_error_handler(fn($error_level, $error_string, $file, $line) => $this->error_handler($error_level, $error_string, $file, $line)); |
| 54 | - set_exception_handler(function (Throwable $e) { |
|
| 54 | + set_exception_handler(function(Throwable $e) { |
|
| 55 | 55 | $this->exception_handler($e); |
| 56 | 56 | }); |
| 57 | 57 | } |
@@ -12,5 +12,6 @@ |
||
| 12 | 12 | header('Location: ' . $boardurl); |
| 13 | 13 | } |
| 14 | 14 | // Can't find it... just forget it. |
| 15 | -else |
|
| 15 | +else { |
|
| 16 | 16 | exit; |
| 17 | +} |
|
@@ -2,6 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
| 4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
| 5 | +{ |
|
| 5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
| 6 | -else |
|
| 7 | - exit; |
|
| 8 | 7 | \ No newline at end of file |
| 8 | +} |
|
| 9 | +else { |
|
| 10 | + exit; |
|
| 11 | +} |
|
@@ -2,6 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
| 4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
| 5 | +{ |
|
| 5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
| 6 | -else |
|
| 7 | - exit; |
|
| 8 | 7 | \ No newline at end of file |
| 8 | +} |
|
| 9 | +else { |
|
| 10 | + exit; |
|
| 11 | +} |
|
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | </li> |
| 136 | 136 | </ul> |
| 137 | 137 | <?php if (User::$info->is_admin) |
| 138 | - { |
|
| 138 | +{ |
|
| 139 | 139 | ?> |
| 140 | 140 | <h3>Advanced Functions <i class="helpicon i-help" title="Functions that require additional tweaking, not just copy and paste."></i></h3> |
| 141 | 141 | <ul> |
@@ -949,10 +949,12 @@ discard block |
||
| 949 | 949 | $topics = ssi_recentTopics(8, null, null, 'array'); |
| 950 | 950 | |
| 951 | 951 | foreach ($topics as $topic) |
| 952 | - echo ' |
|
| 952 | + { |
|
| 953 | + echo ' |
|
| 953 | 954 | <li> |
| 954 | 955 | <a href="', $topic['href'], '">', $topic['subject'], '</a> ', $txt['by'], ' ', $topic['poster']['link'], ' |
| 955 | 956 | </li>'; |
| 957 | + } |
|
| 956 | 958 | |
| 957 | 959 | unset($topics); |
| 958 | 960 | |