Zeile 45 | Zeile 45 |
---|
require_once MYBB_ROOT."inc/class_moderation.php"; $moderation = new Moderation;
|
require_once MYBB_ROOT."inc/class_moderation.php"; $moderation = new Moderation;
|
if(is_array($mybb->input['threads']))
| if($mybb->get_input('threads', MyBB::INPUT_ARRAY))
|
{ $threads_to_approve = $threads_to_delete = array(); // Fetch threads
|
{ $threads_to_approve = $threads_to_delete = array(); // Fetch threads
|
$query = $db->simple_select("threads", "tid", "tid IN (".implode(",", array_map("intval", array_keys($mybb->input['threads'])))."){$flist}");
| $query = $db->simple_select("threads", "tid", "tid IN (".implode(",", array_map("intval", array_keys($mybb->input['threads']))).")");
|
while($thread = $db->fetch_array($query)) { $action = $mybb->input['threads'][$thread['tid']];
| while($thread = $db->fetch_array($query)) { $action = $mybb->input['threads'][$thread['tid']];
|
Zeile 83 | Zeile 83 |
---|
flash_message($lang->success_threads, 'success'); admin_redirect("index.php?module=forum-moderation_queue&type=threads"); }
|
flash_message($lang->success_threads, 'success'); admin_redirect("index.php?module=forum-moderation_queue&type=threads"); }
|
else if(is_array($mybb->input['posts']))
| else if($mybb->get_input('posts', MyBB::INPUT_ARRAY))
|
{ $posts_to_approve = $posts_to_delete = array(); // Fetch posts
|
{ $posts_to_approve = $posts_to_delete = array(); // Fetch posts
|
$query = $db->simple_select("posts", "pid", "pid IN (".implode(",", array_map("intval", array_keys($mybb->input['posts'])))."){$flist}");
| $pids = array_map( "intval", array_keys($mybb->get_input('posts', MyBB::INPUT_ARRAY)) );
$query = $db->simple_select("posts", "pid", "pid IN (".implode(",", $pids).")");
|
while($post = $db->fetch_array($query)) { $action = $mybb->input['posts'][$post['pid']];
| while($post = $db->fetch_array($query)) { $action = $mybb->input['posts'][$post['pid']];
|
Zeile 96 | Zeile 101 |
---|
$posts_to_approve[] = $post['pid']; } else if($action == "delete" && $mybb->settings['soft_delete'] != 1)
|
$posts_to_approve[] = $post['pid']; } else if($action == "delete" && $mybb->settings['soft_delete'] != 1)
|
{
| {
|
$moderation->delete_post($post['pid']); } else if($action == "delete")
| $moderation->delete_post($post['pid']); } else if($action == "delete")
|
Zeile 105 | Zeile 110 |
---|
} } if(!empty($posts_to_approve))
|
} } if(!empty($posts_to_approve))
|
{
| {
|
$moderation->approve_posts($posts_to_approve); } if(!empty($posts_to_delete)) { $moderation->soft_delete_posts($posts_to_delete);
|
$moderation->approve_posts($posts_to_approve); } if(!empty($posts_to_delete)) { $moderation->soft_delete_posts($posts_to_delete);
|
}
$plugins->run_hooks("admin_forum_moderation_queue_posts_commit");
| }
$plugins->run_hooks("admin_forum_moderation_queue_posts_commit");
|
// Log admin action log_admin_action('posts');
| // Log admin action log_admin_action('posts');
|
Zeile 122 | Zeile 127 |
---|
admin_redirect("index.php?module=forum-moderation_queue&type=posts");
}
|
admin_redirect("index.php?module=forum-moderation_queue&type=posts");
}
|
else if(is_array($mybb->input['attachments']))
| else if($mybb->get_input('attachments', MyBB::INPUT_ARRAY))
|
{
|
{
|
$query = $db->simple_select("attachments", "aid, pid", "aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments'])))."){$flist}");
| $query = $db->simple_select("attachments", "aid, pid", "aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments']))).")");
|
while($attachment = $db->fetch_array($query)) { $action = $mybb->input['attachments'][$attachment['aid']];
| while($attachment = $db->fetch_array($query)) { $action = $mybb->input['attachments'][$attachment['aid']];
|
Zeile 155 | Zeile 160 |
---|
$all_options .= "</ul>\n";
// Threads awaiting moderation
|
$all_options .= "</ul>\n";
// Threads awaiting moderation
|
if($mybb->input['type'] == "threads" || !$mybb->input['type'])
| if(empty($mybb->input['type']) || $mybb->input['type'] == "threads")
|
{ $plugins->run_hooks("admin_forum_moderation_queue_threads");
| { $plugins->run_hooks("admin_forum_moderation_queue_threads");
|
Zeile 165 | Zeile 170 |
---|
$unapproved_threads = $db->fetch_field($query, "unapprovedthreads");
if($unapproved_threads > 0)
|
$unapproved_threads = $db->fetch_field($query, "unapprovedthreads");
if($unapproved_threads > 0)
|
{ // Figure out if we need to display multiple pages. $per_page = 15; if($mybb->input['page'] > 0) { $current_page = $mybb->get_input('page', MyBB::INPUT_INT);
| { // Figure out if we need to display multiple pages. $per_page = 15; $mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT); if($mybb->input['page'] > 0) { $current_page = $mybb->input['page'];
|
$start = ($current_page-1)*$per_page; $pages = $unapproved_threads / $per_page; $pages = ceil($pages);
| $start = ($current_page-1)*$per_page; $pages = $unapproved_threads / $per_page; $pages = ceil($pages);
|
Zeile 285 | Zeile 291 |
---|
}
// Posts awaiting moderation
|
}
// Posts awaiting moderation
|
if($mybb->input['type'] == "posts" || $mybb->input['type'] == "")
| if($mybb->get_input('type') == "posts" || $mybb->get_input('type') == "")
|
{ $plugins->run_hooks("admin_forum_moderation_queue_posts");
| { $plugins->run_hooks("admin_forum_moderation_queue_posts");
|
Zeile 303 | Zeile 309 |
---|
{ // Figure out if we need to display multiple pages. $per_page = 15;
|
{ // Figure out if we need to display multiple pages. $per_page = 15;
|
if($mybb->input['page'] > 0)
| if($mybb->get_input('page') > 0)
|
{ $current_page = $mybb->get_input('page', MyBB::INPUT_INT); $start = ($current_page-1)*$per_page;
| { $current_page = $mybb->get_input('page', MyBB::INPUT_INT); $start = ($current_page-1)*$per_page;
|
Zeile 428 | Zeile 434 |
---|
$page->output_footer(); }
|
$page->output_footer(); }
|
else if($mybb->input['type'] == "posts")
| else if($mybb->get_input('type') == "posts")
|
{ $page->output_header($lang->moderation_queue); $page->output_nav_tabs($sub_tabs, "posts");
| { $page->output_header($lang->moderation_queue); $page->output_nav_tabs($sub_tabs, "posts");
|
Zeile 438 | Zeile 444 |
---|
}
// Attachments awaiting moderation
|
}
// Attachments awaiting moderation
|
if($mybb->input['type'] == "attachments" || $mybb->input['type'] == "")
| if($mybb->get_input('type') == "attachments" || $mybb->get_input('type') == "")
|
{ $plugins->run_hooks("admin_forum_moderation_queue_attachments");
| { $plugins->run_hooks("admin_forum_moderation_queue_attachments");
|
Zeile 567 | Zeile 573 |
---|
$page->output_footer(); }
|
$page->output_footer(); }
|
else if($mybb->input['type'] == "attachments")
| else if($mybb->get_input('type') == "attachments")
|
{ $page->output_header($lang->moderation_queue); $page->output_nav_tabs($sub_tabs, "attachments");
| { $page->output_header($lang->moderation_queue); $page->output_nav_tabs($sub_tabs, "attachments");
|