Zeile 39 | Zeile 39 |
---|
$fid = $mybb->get_input('fid', MyBB::INPUT_INT); $pmid = $mybb->get_input('pmid', MyBB::INPUT_INT); $modal = $mybb->get_input('modal', MyBB::INPUT_INT);
|
$fid = $mybb->get_input('fid', MyBB::INPUT_INT); $pmid = $mybb->get_input('pmid', MyBB::INPUT_INT); $modal = $mybb->get_input('modal', MyBB::INPUT_INT);
|
| if($mybb->user['uid'] == 0) { error_no_permission(); }
|
if($pid) {
| if($pid) {
|
Zeile 70 | Zeile 76 |
---|
// Get our permissions all nice and setup $permissions = forum_permissions($fid);
|
// Get our permissions all nice and setup $permissions = forum_permissions($fid);
|
}
| }
|
if($pmid > 0) {
| if($pmid > 0) {
|
Zeile 116 | Zeile 122 |
---|
if(!empty($mybb->input['searchid'])) { $tids = getids($mybb->get_input('searchid'), 'search');
|
if(!empty($mybb->input['searchid'])) { $tids = getids($mybb->get_input('searchid'), 'search');
|
}
| }
|
else { $tids = getids($fid, 'forum');
| else { $tids = getids($fid, 'forum');
|
Zeile 126 | Zeile 132 |
---|
unset($tids); }
|
unset($tids); }
|
|
|
$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']); eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");
$allowable_moderation_actions = array("getip", "getpmip", "cancel_delayedmoderation", "delayedmoderation", "threadnotes", "purgespammer", "viewthreadnotes");
|
$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']); eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");
$allowable_moderation_actions = array("getip", "getpmip", "cancel_delayedmoderation", "delayedmoderation", "threadnotes", "purgespammer", "viewthreadnotes");
|
|
|
if($mybb->request_method != "post" && !in_array($mybb->input['action'], $allowable_moderation_actions)) { error_no_permission();
| if($mybb->request_method != "post" && !in_array($mybb->input['action'], $allowable_moderation_actions)) { error_no_permission();
|
Zeile 159 | Zeile 165 |
---|
{ moderation_redirect(get_forum_link($fid), $lang->redirect_delayed_moderation_cancelled); }
|
{ moderation_redirect(get_forum_link($fid), $lang->redirect_delayed_moderation_cancelled); }
|
else { moderation_redirect("moderation.php?action=delayedmoderation&tid={$tid}&my_post_key={$mybb->post_code}", $lang->redirect_delayed_moderation_cancelled); }
| else { moderation_redirect("moderation.php?action=delayedmoderation&tid={$tid}&my_post_key={$mybb->post_code}", $lang->redirect_delayed_moderation_cancelled); }
|
break; case "do_delayedmoderation": case "delayedmoderation":
| break; case "do_delayedmoderation": case "delayedmoderation":
|
Zeile 405 | Zeile 411 |
---|
$mybb->input['delayedmoderation']['new_forum'] = (int)$mybb->input['delayedmoderation']['new_forum']; $mybb->input['delayedmoderation']['subject'] = htmlspecialchars_uni($mybb->input['delayedmoderation']['subject']); $mybb->input['delayedmoderation']['threadurl'] = htmlspecialchars_uni($mybb->input['delayedmoderation']['threadurl']);
|
$mybb->input['delayedmoderation']['new_forum'] = (int)$mybb->input['delayedmoderation']['new_forum']; $mybb->input['delayedmoderation']['subject'] = htmlspecialchars_uni($mybb->input['delayedmoderation']['subject']); $mybb->input['delayedmoderation']['threadurl'] = htmlspecialchars_uni($mybb->input['delayedmoderation']['threadurl']);
|
|
|
$forumselect = build_forum_jump("", $mybb->input['delayedmoderation']['new_forum'], 1, '', 0, true, '', "delayedmoderation[new_forum]"); } }
| $forumselect = build_forum_jump("", $mybb->input['delayedmoderation']['new_forum'], 1, '', 0, true, '', "delayedmoderation[new_forum]"); } }
|
Zeile 765 | Zeile 771 |
---|
// Remove redirects to a specific thread case "removeredirects":
|
// Remove redirects to a specific thread case "removeredirects":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
}
if($thread['visible'] == -1)
| }
if($thread['visible'] == -1)
|
Zeile 813 | Zeile 819 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "candeletethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "candeletethreads"))
|
{ if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
| { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
|
}
$plugins->run_hooks("moderation_do_deletethread");
| }
$plugins->run_hooks("moderation_do_deletethread");
|
Zeile 838 | Zeile 844 |
---|
// Delete the poll from a thread confirmation page case "deletepoll": add_breadcrumb($lang->nav_deletepoll);
|
// Delete the poll from a thread confirmation page case "deletepoll": add_breadcrumb($lang->nav_deletepoll);
|
if(!is_moderator($fid, "canmanagepolls")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
$plugins->run_hooks("moderation_deletepoll");
| if(!is_moderator($fid, "canmanagepolls")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
$plugins->run_hooks("moderation_deletepoll");
|
$query = $db->simple_select("polls", "pid", "tid='$tid'"); $poll = $db->fetch_array($query); if(!$poll)
| $query = $db->simple_select("polls", "pid", "tid='$tid'"); $poll = $db->fetch_array($query); if(!$poll)
|
Zeile 893 | Zeile 899 |
---|
$lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->poll_deleted);
|
$lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->poll_deleted);
|
|
|
$moderation->delete_poll($poll['pid']);
|
$moderation->delete_poll($poll['pid']);
|
|
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_polldeleted); break;
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_polldeleted); break;
|
|
|
// Approve a thread case "approvethread":
|
// Approve a thread case "approvethread":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canapproveunapprovethreads")) { error_no_permission(); }
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canapproveunapprovethreads")) { error_no_permission(); }
|
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
Zeile 934 | Zeile 940 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canapproveunapprovethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canapproveunapprovethreads"))
|
{ error_no_permission(); }
if($thread['visible'] == -1) {
| { error_no_permission(); }
if($thread['visible'] == -1) {
|
error($lang->error_thread_deleted, $lang->error); }
| error($lang->error_thread_deleted, $lang->error); }
|
Zeile 949 | Zeile 955 |
---|
$lang->thread_unapproved = $lang->sprintf($lang->thread_unapproved, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_unapproved);
|
$lang->thread_unapproved = $lang->sprintf($lang->thread_unapproved, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_unapproved);
|
|
|
$moderation->unapprove_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
|
$moderation->unapprove_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
|
break;
| break;
|
// Restore a thread case "restorethread":
| // Restore a thread case "restorethread":
|
Zeile 984 | Zeile 990 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "cansoftdeletethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "cansoftdeletethreads"))
|
{
| {
|
error_no_permission(); } $thread = get_thread($tid);
| error_no_permission(); } $thread = get_thread($tid);
|
Zeile 1014 | Zeile 1020 |
---|
$plugins->run_hooks("moderation_move");
|
$plugins->run_hooks("moderation_move");
|
$forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto");
| $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
eval("\$movethread = \"".$templates->get("moderation_move")."\";"); output_page($movethread); break;
| eval("\$movethread = \"".$templates->get("moderation_move")."\";"); output_page($movethread); break;
|
Zeile 3016 | Zeile 3022 |
---|
$uid = $mybb->get_input('uid', MyBB::INPUT_INT); $user = get_user($uid);
|
$uid = $mybb->get_input('uid', MyBB::INPUT_INT); $user = get_user($uid);
|
if(!$user['uid'] || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid']))
| if(!$user || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid']))
|
{ error($lang->purgespammer_invalid_user); }
| { error($lang->purgespammer_invalid_user); }
|