@@ -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 | }); |
@@ -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(); |
@@ -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 | ); |
@@ -393,17 +393,17 @@ discard block |
||
| 393 | 393 | $quickbuttons = array( |
| 394 | 394 | 'approve' => array( |
| 395 | 395 | 'label' => $txt['approve'], |
| 396 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';approve='.$item['id'], |
|
| 396 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';approve=' . $item['id'], |
|
| 397 | 397 | 'icon' => 'approve', |
| 398 | 398 | ), |
| 399 | 399 | 'delete' => array( |
| 400 | 400 | 'label' => $txt['remove'], |
| 401 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';delete='.$item['id'], |
|
| 401 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';delete=' . $item['id'], |
|
| 402 | 402 | 'icon' => 'remove_button', |
| 403 | 403 | 'show' => $item['can_delete'] |
| 404 | 404 | ), |
| 405 | 405 | 'quickmod' => array( |
| 406 | - 'content' => '<input type="checkbox" name="item[]" value="'.$item['id'].'" checked>', |
|
| 406 | + 'content' => '<input type="checkbox" name="item[]" value="' . $item['id'] . '" checked>', |
|
| 407 | 407 | 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 |
| 408 | 408 | ), |
| 409 | 409 | ); |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | $quickbuttons = array( |
| 469 | 469 | 'delete' => array( |
| 470 | 470 | 'label' => $txt['remove_message'], |
| 471 | - 'href' => $scripturl.'?action=moderate;area=userwatch;sa=post;delete='.$post['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 471 | + 'href' => $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 472 | 472 | 'javascript' => 'data-confirm="' . $txt['mc_watched_users_delete_post'] . '" class="you_sure"', |
| 473 | 473 | 'icon' => 'remove_button', |
| 474 | 474 | 'show' => $post['can_delete'] |
@@ -645,13 +645,13 @@ discard block |
||
| 645 | 645 | 'quickbuttons' => array( |
| 646 | 646 | 'edit' => array( |
| 647 | 647 | 'label' => $txt['draft_edit'], |
| 648 | - 'href' => $scripturl.'?action=post;'.(empty($row['id_topic']) ? 'board='.$row['id_board'] : 'topic='.$row['id_topic']).'.0;id_draft='.$row['id_draft'], |
|
| 648 | + 'href' => $scripturl . '?action=post;' . (empty($row['id_topic']) ? 'board=' . $row['id_board'] : 'topic=' . $row['id_topic']) . '.0;id_draft=' . $row['id_draft'], |
|
| 649 | 649 | 'icon' => 'modify_button' |
| 650 | 650 | ), |
| 651 | 651 | 'delete' => array( |
| 652 | 652 | 'label' => $txt['draft_delete'], |
| 653 | - 'href' => $scripturl.'?action=profile;u='.$context['member']['id'].';area=showdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 654 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'" class="you_sure"', |
|
| 653 | + 'href' => $scripturl . '?action=profile;u=' . $context['member']['id'] . ';area=showdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 654 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '" class="you_sure"', |
|
| 655 | 655 | 'icon' => 'remove_button' |
| 656 | 656 | ), |
| 657 | 657 | ), |
@@ -837,13 +837,13 @@ discard block |
||
| 837 | 837 | 'quickbuttons' => array( |
| 838 | 838 | 'edit' => array( |
| 839 | 839 | 'label' => $txt['draft_edit'], |
| 840 | - 'href' => $scripturl.'?action=pm;sa=showpmdrafts;id_draft='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 840 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;id_draft=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 841 | 841 | 'icon' => 'modify_button' |
| 842 | 842 | ), |
| 843 | 843 | 'delete' => array( |
| 844 | 844 | 'label' => $txt['draft_delete'], |
| 845 | - 'href' => $scripturl.'?action=pm;sa=showpmdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 846 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'?" class="you_sure"', |
|
| 845 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 846 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '?" class="you_sure"', |
|
| 847 | 847 | 'icon' => 'remove_button' |
| 848 | 848 | ), |
| 849 | 849 | ), |
@@ -93,13 +93,13 @@ discard block |
||
| 93 | 93 | ), |
| 94 | 94 | 'ignore' => array( |
| 95 | 95 | 'label' => $report['ignore'] ? $txt['mc_reportedp_unignore'] : $txt['mc_reportedp_ignore'], |
| 96 | - 'href' => $scripturl.'?action=moderate;area=reported'.$context['report_type'].';sa=handle;ignore='.(int)!$report['ignore'].';rid='.$report['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'], |
|
| 96 | + 'href' => $scripturl . '?action=moderate;area=reported' . $context['report_type'] . ';sa=handle;ignore=' . (int) !$report['ignore'] . ';rid=' . $report['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'], |
|
| 97 | 97 | 'javascript' => !$report['ignore'] ? ' class="you_sure" data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', |
| 98 | 98 | 'icon' => 'ignore' |
| 99 | 99 | ), |
| 100 | 100 | 'close' => array( |
| 101 | 101 | 'label' => $context['view_closed'] ? $txt['mc_reportedp_open'] : $txt['mc_reportedp_close'], |
| 102 | - 'href' => $scripturl.'?action=moderate;area=reported'.$context['report_type'].';sa=handle;closed='.(int)!$report['closed'].';rid='.$report['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'], |
|
| 102 | + 'href' => $scripturl . '?action=moderate;area=reported' . $context['report_type'] . ';sa=handle;closed=' . (int) !$report['closed'] . ';rid=' . $report['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'], |
|
| 103 | 103 | 'icon' => $context['view_closed'] ? 'folder' : 'close', |
| 104 | 104 | ), |
| 105 | 105 | ); |
@@ -108,17 +108,17 @@ discard block |
||
| 108 | 108 | if ($context['report_type'] == 'posts') |
| 109 | 109 | $context['reports'][$key]['quickbuttons']['delete'] = array( |
| 110 | 110 | 'label' => $txt['mc_reportedp_delete'], |
| 111 | - 'href' => $scripturl.'?action=deletemsg;topic='.$report['topic']['id'].'.0;msg='.$report['topic']['id_msg'].';modcenter;'.$context['session_var'].'='.$context['session_id'], |
|
| 112 | - 'javascript' => 'data-confirm="'.$txt['mc_reportedp_delete_confirm'].'" class="you_sure"', |
|
| 111 | + 'href' => $scripturl . '?action=deletemsg;topic=' . $report['topic']['id'] . '.0;msg=' . $report['topic']['id_msg'] . ';modcenter;' . $context['session_var'] . '=' . $context['session_id'], |
|
| 112 | + 'javascript' => 'data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '" class="you_sure"', |
|
| 113 | 113 | 'icon' => 'delete', |
| 114 | 114 | 'show' => !$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards'])) |
| 115 | 115 | ); |
| 116 | 116 | |
| 117 | 117 | // Ban reported member/post author link |
| 118 | 118 | if ($context['report_type'] == 'members') |
| 119 | - $ban_link = $scripturl.'?action=admin;area=ban;sa=add;u='.$report['user']['id'].';'.$context['session_var'].'='.$context['session_id']; |
|
| 119 | + $ban_link = $scripturl . '?action=admin;area=ban;sa=add;u=' . $report['user']['id'] . ';' . $context['session_var'] . '=' . $context['session_id']; |
|
| 120 | 120 | else |
| 121 | - $ban_link = $scripturl.'?action=admin;area=ban;sa=add'.(!empty($report['author']['id']) ? ';u='.$report['author']['id'] : ';msg='.$report['topic']['id_msg']).';'.$context['session_var'].'='.$context['session_id']; |
|
| 121 | + $ban_link = $scripturl . '?action=admin;area=ban;sa=add' . (!empty($report['author']['id']) ? ';u=' . $report['author']['id'] : ';msg=' . $report['topic']['id_msg']) . ';' . $context['session_var'] . '=' . $context['session_id']; |
|
| 122 | 122 | |
| 123 | 123 | $context['reports'][$key]['quickbuttons'] += array( |
| 124 | 124 | 'ban' => array( |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | 'show' => !$report['closed'] && !empty($context['report_manage_bans']) && ($context['report_type'] == 'posts' || $context['report_type'] == 'members' && !empty($report['user']['id'])) |
| 129 | 129 | ), |
| 130 | 130 | 'quickmod' => array( |
| 131 | - 'content' => '<input type="checkbox" name="close[]" value="'.$report['id'].'">', |
|
| 131 | + 'content' => '<input type="checkbox" name="close[]" value="' . $report['id'] . '">', |
|
| 132 | 132 | 'show' => !$context['view_closed'] |
| 133 | 133 | ) |
| 134 | 134 | ); |
@@ -463,20 +463,20 @@ |
||
| 463 | 463 | $context['posts'][$key]['quickbuttons'] = array( |
| 464 | 464 | 'reply' => array( |
| 465 | 465 | 'label' => $txt['reply'], |
| 466 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
| 466 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
| 467 | 467 | 'icon' => 'reply_button', |
| 468 | 468 | 'show' => $post['can_reply'] |
| 469 | 469 | ), |
| 470 | 470 | 'quote' => array( |
| 471 | 471 | 'label' => $txt['quote_action'], |
| 472 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
| 472 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
| 473 | 473 | 'icon' => 'quote', |
| 474 | 474 | 'show' => $post['can_quote'] |
| 475 | 475 | ), |
| 476 | 476 | 'delete' => array( |
| 477 | 477 | 'label' => $txt['remove'], |
| 478 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';recent;'.$context['session_var'].'='.$context['session_id'], |
|
| 479 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'" class="you_sure"', |
|
| 478 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';recent;' . $context['session_var'] . '=' . $context['session_id'], |
|
| 479 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '" class="you_sure"', |
|
| 480 | 480 | 'icon' => 'remove_button', |
| 481 | 481 | 'show' => $post['can_delete'] |
| 482 | 482 | ), |