@@ -742,7 +742,7 @@ |
||
742 | 742 | |
743 | 743 | // Filter out any redundant separators before we start the loop |
744 | 744 | $context['config_vars'] = array_filter($context['config_vars'], function ($v) use ($context) |
745 | - { |
|
745 | + { |
|
746 | 746 | static $config_vars, $prev; |
747 | 747 | |
748 | 748 | $at_start = is_null($config_vars); |
@@ -756,7 +756,7 @@ |
||
756 | 756 | } |
757 | 757 | |
758 | 758 | // Filter out any redundant separators before we start the loop |
759 | - $context['config_vars'] = array_filter($context['config_vars'], function ($v) use ($context) |
|
759 | + $context['config_vars'] = array_filter($context['config_vars'], function($v) use ($context) |
|
760 | 760 | { |
761 | 761 | static $config_vars, $prev; |
762 | 762 |
@@ -1965,7 +1965,7 @@ |
||
1965 | 1965 | // Remove anything that isn't actually new from our list of files |
1966 | 1966 | foreach ($to_unset as $key => $ids) |
1967 | 1967 | { |
1968 | - if (array_reduce($ids, function ($carry, $item) { return $carry * $item; }, true) == true) |
|
1968 | + if (array_reduce($ids, function($carry, $item) { return $carry * $item; }, true) == true) |
|
1969 | 1969 | unset($smiley_files[$key]); |
1970 | 1970 | } |
1971 | 1971 |
@@ -1965,7 +1965,9 @@ |
||
1965 | 1965 | // Remove anything that isn't actually new from our list of files |
1966 | 1966 | foreach ($to_unset as $key => $ids) |
1967 | 1967 | { |
1968 | - if (array_reduce($ids, function ($carry, $item) { return $carry * $item; }, true) == true) |
|
1968 | + if (array_reduce($ids, function ($carry, $item) |
|
1969 | + { |
|
1970 | +return $carry * $item; }, true) == true) |
|
1969 | 1971 | unset($smiley_files[$key]); |
1970 | 1972 | } |
1971 | 1973 |
@@ -1254,7 +1254,6 @@ |
||
1254 | 1254 | |
1255 | 1255 | return array($charset, $string, 'base64'); |
1256 | 1256 | } |
1257 | - |
|
1258 | 1257 | else |
1259 | 1258 | return array($charset, $string, '7bit'); |
1260 | 1259 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | // Set a list of common functions. |
83 | 83 | $ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);'; |
84 | 84 | $ent_check = empty($modSettings['disableEntityCheck']) ? function($string) |
85 | - { |
|
85 | + { |
|
86 | 86 | $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string); |
87 | 87 | return $string; |
88 | 88 | } : function($string) |
@@ -2131,7 +2131,6 @@ discard block |
||
2131 | 2131 | loadLanguage('index+Modifications'); |
2132 | 2132 | $context['template_layers'] = array(); |
2133 | 2133 | } |
2134 | - |
|
2135 | 2134 | else |
2136 | 2135 | { |
2137 | 2136 | // Custom templates to load, or just default? |
@@ -2509,14 +2508,12 @@ discard block |
||
2509 | 2508 | $fileUrl = $settings['default_theme_url'] . '/css/' . $fileName; |
2510 | 2509 | $filePath = $settings['default_theme_dir'] . '/css/' . $fileName; |
2511 | 2510 | } |
2512 | - |
|
2513 | 2511 | else |
2514 | 2512 | { |
2515 | 2513 | $fileUrl = false; |
2516 | 2514 | $filePath = false; |
2517 | 2515 | } |
2518 | 2516 | } |
2519 | - |
|
2520 | 2517 | else |
2521 | 2518 | { |
2522 | 2519 | $fileUrl = $settings[$themeRef . '_url'] . '/css/' . $fileName; |
@@ -2623,14 +2620,12 @@ discard block |
||
2623 | 2620 | $fileUrl = $settings['default_theme_url'] . '/scripts/' . $fileName; |
2624 | 2621 | $filePath = $settings['default_theme_dir'] . '/scripts/' . $fileName; |
2625 | 2622 | } |
2626 | - |
|
2627 | 2623 | else |
2628 | 2624 | { |
2629 | 2625 | $fileUrl = false; |
2630 | 2626 | $filePath = false; |
2631 | 2627 | } |
2632 | 2628 | } |
2633 | - |
|
2634 | 2629 | else |
2635 | 2630 | { |
2636 | 2631 | $fileUrl = $settings[$themeRef . '_url'] . '/scripts/' . $fileName; |
@@ -1823,7 +1823,7 @@ |
||
1823 | 1823 | if (!empty($excluded_groups)) |
1824 | 1824 | { |
1825 | 1825 | // Make sure this is an array of integers |
1826 | - $excluded_groups = array_filter((array) $excluded_groups, function ($v) |
|
1826 | + $excluded_groups = array_filter((array) $excluded_groups, function($v) |
|
1827 | 1827 | { |
1828 | 1828 | return is_int($v) || is_string($v) && (string) intval($v) === $v; |
1829 | 1829 | }); |
@@ -1824,7 +1824,7 @@ |
||
1824 | 1824 | { |
1825 | 1825 | // Make sure this is an array of integers |
1826 | 1826 | $excluded_groups = array_filter((array) $excluded_groups, function ($v) |
1827 | - { |
|
1827 | + { |
|
1828 | 1828 | return is_int($v) || is_string($v) && (string) intval($v) === $v; |
1829 | 1829 | }); |
1830 | 1830 |
@@ -975,7 +975,7 @@ |
||
975 | 975 | else |
976 | 976 | { |
977 | 977 | $return = array(); |
978 | - while($row = mysqli_fetch_assoc($request)) |
|
978 | + while ($row = mysqli_fetch_assoc($request)) |
|
979 | 979 | $return[] = $row; |
980 | 980 | } |
981 | 981 | return !empty($return) ? $return : array(); |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | <script> |
389 | 389 | function swapPostGroup(isChecked) |
390 | 390 | { |
391 | - var is_moderator_group = ', (int)$context['is_moderator_group'], '; |
|
391 | + var is_moderator_group = ', (int) $context['is_moderator_group'], '; |
|
392 | 392 | var group_type = ', $context['group']['type'], '; |
393 | 393 | var min_posts_text = document.getElementById(\'min_posts_text\'); |
394 | 394 | var group_desc_text = document.getElementById(\'group_desc_text\'); |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | if (empty($modSettings['deny_boards_access'])) |
454 | 454 | echo ' |
455 | 455 | <li class="category"> |
456 | - <a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \''.$form_id.'\'); return false;"><strong>', $category['name'], '</strong></a> |
|
456 | + <a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'' . $form_id . '\'); return false;"><strong>', $category['name'], '</strong></a> |
|
457 | 457 | <ul>'; |
458 | 458 | else |
459 | 459 | echo ' |
@@ -143,7 +143,7 @@ |
||
143 | 143 | |
144 | 144 | // Redirect to the selector if they chose selective. |
145 | 145 | if ($_POST['step2'] == 'selective') |
146 | - redirectexit ('action=splittopics;sa=selectTopics;subname=' . $_POST['subname'] . ';topic=' . $topic . '.0;start2=0'); |
|
146 | + redirectexit('action=splittopics;sa=selectTopics;subname=' . $_POST['subname'] . ';topic=' . $topic . '.0;start2=0'); |
|
147 | 147 | |
148 | 148 | $_POST['at'] = (int) $_POST['at']; |
149 | 149 | $messagesToBeSplit = array(); |
@@ -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 |
@@ -185,14 +185,14 @@ discard block |
||
185 | 185 | $report_buttons = array( |
186 | 186 | 'ignore' => array( |
187 | 187 | 'text' => !$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore', |
188 | - 'url' => $scripturl.'?action=moderate;area=reportedposts;sa=handle;ignore='.(int) !$context['report']['ignore'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'], |
|
188 | + 'url' => $scripturl . '?action=moderate;area=reportedposts;sa=handle;ignore=' . (int) !$context['report']['ignore'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'], |
|
189 | 189 | 'class' => !$context['report']['ignore'] ? ' you_sure' : '', |
190 | 190 | 'custom' => !$context['report']['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', |
191 | 191 | 'icon' => 'ignore' |
192 | 192 | ), |
193 | 193 | 'close' => array( |
194 | 194 | 'text' => $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', |
195 | - 'url' => $scripturl.'?action=moderate;area=reportedposts;sa=handle;closed='.(int) !$context['report']['closed'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'], |
|
195 | + 'url' => $scripturl . '?action=moderate;area=reportedposts;sa=handle;closed=' . (int) !$context['report']['closed'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'], |
|
196 | 196 | 'icon' => 'close' |
197 | 197 | ) |
198 | 198 | ); |
@@ -465,14 +465,14 @@ discard block |
||
465 | 465 | $report_buttons = array( |
466 | 466 | 'ignore' => array( |
467 | 467 | 'text' => !$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore', |
468 | - 'url' => $scripturl.'?action=moderate;area=reportedmembers;sa=handle;ignore='.(int)!$context['report']['ignore'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'], |
|
468 | + 'url' => $scripturl . '?action=moderate;area=reportedmembers;sa=handle;ignore=' . (int) !$context['report']['ignore'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'], |
|
469 | 469 | 'class' => !$context['report']['ignore'] ? ' you_sure' : '', |
470 | 470 | 'custom' => !$context['report']['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', |
471 | 471 | 'icon' => 'ignore' |
472 | 472 | ), |
473 | 473 | 'close' => array( |
474 | 474 | 'text' => $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', |
475 | - 'url' => $scripturl.'?action=moderate;area=reportedmembers;sa=handle;closed='.(int)!$context['report']['closed'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'], |
|
475 | + 'url' => $scripturl . '?action=moderate;area=reportedmembers;sa=handle;closed=' . (int) !$context['report']['closed'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'], |
|
476 | 476 | 'icon' => 'close' |
477 | 477 | ) |
478 | 478 | ); |