} $action = $mybb->input['posts'][$post['pid']]; if ($action == "approve") { $posts_to_approve[] = $post['pid']; } else { if ($action == "delete" && $mybb->settings['soft_delete'] != 1) { $moderation->delete_post($post['pid']); } else { if ($action == "delete") { $posts_to_delete[] = $post['pid']; } } } } if (!empty($posts_to_approve)) { $moderation->approve_posts($posts_to_approve); log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts); } if (!empty($posts_to_delete)) { if ($mybb->settings['soft_delete'] == 1) { $moderation->soft_delete_posts($posts_to_delete); log_moderator_action(array('pids' => $posts_to_delete), $lang->multi_soft_delete_posts); } else { log_moderator_action(array('pids' => $posts_to_delete), $lang->multi_delete_posts); } } $plugins->run_hooks("modcp_do_modqueue_end"); redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated); } else { if (!empty($mybb->input['attachments'])) { $attachments = array_map("intval", array_keys($mybb->input['attachments']));
if ($mybb->input['inlinetype'] == 'search') { $posts = getids($mybb->input['searchid'], 'search'); } else { $posts = getids($tid, 'thread'); } if (count($posts) < 1) { error($lang->error_inline_nopostsselected); } if (!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission(); } $pids = array(); foreach ($posts as $pid) { $pids[] = intval($pid); } $moderation->approve_posts($pids); log_moderator_action($modlogdata, $lang->multi_approve_posts); if ($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); } else { clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved); break; // Unapprove posts - Inline moderation // Unapprove posts - Inline moderation case "multiunapproveposts": // Verify incoming POST request verify_post_check($mybb->input['my_post_key']); if ($mybb->input['inlinetype'] == 'search') { $posts = getids($mybb->input['searchid'], 'search');