Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: moderation.php 4083 2008-08-08 02:09:05Z Tikitiki $
| * $Id: moderation.php 4308 2009-01-14 03:58:30Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 95 | Zeile 95 |
---|
else { eval("\$loginbox = \"".$templates->get("loginbox")."\";");
|
else { eval("\$loginbox = \"".$templates->get("loginbox")."\";");
|
| }
if($mybb->request_method != "post" && $mybb->input['action'] != "getip") { error_no_permission();
|
}
// Begin!
| }
// Begin!
|
Zeile 164 | Zeile 169 |
---|
// Remove redirects to a specific thread case "removeredirects":
|
// Remove redirects to a specific thread case "removeredirects":
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(!is_moderator($fid, "canmanagethreads"))
|
if(!is_moderator($fid, "canmanagethreads"))
|
{
| {
|
error_no_permission(); }
$plugins->run_hooks("moderation_removeredirects");
|
error_no_permission(); }
$plugins->run_hooks("moderation_removeredirects");
|
|
|
$moderation->remove_redirects($tid);
log_moderator_action($modlogdata, $lang->redirects_removed);
| $moderation->remove_redirects($tid);
log_moderator_action($modlogdata, $lang->redirects_removed);
|
Zeile 185 | Zeile 190 |
---|
case "deletethread":
add_breadcrumb($lang->nav_deletethread);
|
case "deletethread":
add_breadcrumb($lang->nav_deletethread);
|
if(!is_moderator($fid, "candeleteposts")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
| if(!is_moderator($fid, "candeleteposts")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
|
}
|
}
|
$thread['subject'] = htmlspecialchars_uni($thread['subject']);
| |
$plugins->run_hooks("moderation_deletethread");
| $plugins->run_hooks("moderation_deletethread");
|
Zeile 234 | Zeile 237 |
---|
// 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, "candeleteposts")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
| if(!is_moderator($fid, "candeleteposts")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
|
$plugins->run_hooks("moderation_deletepoll");
$query = $db->simple_select("polls", "*", "tid='$tid'");
| $plugins->run_hooks("moderation_deletepoll");
$query = $db->simple_select("polls", "*", "tid='$tid'");
|
Zeile 255 | Zeile 258 |
---|
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";"); output_page($deletepoll); break;
|
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";"); output_page($deletepoll); break;
|
|
|
// Delete the actual poll here! case "do_deletepoll":
|
// Delete the actual poll here! case "do_deletepoll":
|
|
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
Zeile 267 | Zeile 270 |
---|
error($lang->redirect_pollnotdeleted); } if(!is_moderator($fid, "candeleteposts"))
|
error($lang->redirect_pollnotdeleted); } if(!is_moderator($fid, "candeleteposts"))
|
{
| {
|
if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission();
| if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission();
|
Zeile 279 | Zeile 282 |
---|
{ error($lang->error_invalidpoll); }
|
{ error($lang->error_invalidpoll); }
|
|
|
$plugins->run_hooks("moderation_do_deletepoll");
$lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']);
| $plugins->run_hooks("moderation_do_deletepoll");
$lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']);
|
Zeile 292 | Zeile 295 |
---|
// Approve a thread case "approvethread":
|
// Approve a thread case "approvethread":
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(!is_moderator($fid, "canopenclosethreads")) { error_no_permission(); } $query = $db->simple_select("threads", "*", "tid='$tid'"); $thread = $db->fetch_array($query);
|
if(!is_moderator($fid, "canopenclosethreads")) { error_no_permission(); } $query = $db->simple_select("threads", "*", "tid='$tid'"); $thread = $db->fetch_array($query);
|
|
|
$plugins->run_hooks("moderation_approvethread");
$lang->thread_approved = $lang->sprintf($lang->thread_approved, $thread['subject']);
| $plugins->run_hooks("moderation_approvethread");
$lang->thread_approved = $lang->sprintf($lang->thread_approved, $thread['subject']);
|
Zeile 320 | Zeile 323 |
---|
verify_post_check($mybb->input['my_post_key']);
if(!is_moderator($fid, "canopenclosethreads"))
|
verify_post_check($mybb->input['my_post_key']);
if(!is_moderator($fid, "canopenclosethreads"))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
$query = $db->simple_select("threads", "*", "tid='$tid'"); $thread = $db->fetch_array($query);
$plugins->run_hooks("moderation_unapprovethread");
|
$query = $db->simple_select("threads", "*", "tid='$tid'"); $thread = $db->fetch_array($query);
$plugins->run_hooks("moderation_unapprovethread");
|
|
|
$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);
|
Zeile 339 | Zeile 342 |
---|
// Delete selective posts in a thread case "deleteposts": add_breadcrumb($lang->nav_deleteposts);
|
// Delete selective posts in a thread case "deleteposts": add_breadcrumb($lang->nav_deleteposts);
|
if(!is_moderator($fid, "candeleteposts")) { error_no_permission(); } $posts = ""; $query = $db->query(" SELECT p.*, u.*
| if(!is_moderator($fid, "candeleteposts")) { error_no_permission(); } $posts = ""; $query = $db->query(" SELECT p.*, u.*
|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid) WHERE tid='$tid'
|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid) WHERE tid='$tid'
|
ORDER BY dateline ASC "); $altbg = "trow1"; while($post = $db->fetch_array($query)) { $postdate = my_date($mybb->settings['dateformat'], $post['dateline']); $posttime = my_date($mybb->settings['timeformat'], $post['dateline']);
$parser_options = array( "allow_html" => $forum['allowhtml'], "allow_mycode" => $forum['allowmycode'], "allow_smilies" => $forum['allowsmilies'], "allow_imgcode" => $forum['allowimgcode'], "filter_badwords" => 1 ); if($post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0; }
$message = $parser->parse_message($post['message'], $parser_options);
| ORDER BY dateline ASC "); $altbg = "trow1"; while($post = $db->fetch_array($query)) { $postdate = my_date($mybb->settings['dateformat'], $post['dateline']); $posttime = my_date($mybb->settings['timeformat'], $post['dateline']);
$parser_options = array( "allow_html" => $forum['allowhtml'], "allow_mycode" => $forum['allowmycode'], "allow_smilies" => $forum['allowsmilies'], "allow_imgcode" => $forum['allowimgcode'], "filter_badwords" => 1 ); if($post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0; }
$message = $parser->parse_message($post['message'], $parser_options);
|
eval("\$posts .= \"".$templates->get("moderation_deleteposts_post")."\";"); $altbg = alt_trow(); }
| eval("\$posts .= \"".$templates->get("moderation_deleteposts_post")."\";"); $altbg = alt_trow(); }
|
Zeile 419 | Zeile 422 |
---|
{ $url = get_thread_link($thread['tid']); mark_reports($tid, "thread");
|
{ $url = get_thread_link($thread['tid']); mark_reports($tid, "thread");
|
}
| }
|
$lang->deleted_selective_posts = $lang->sprintf($lang->deleted_selective_posts, $deletecount); log_moderator_action($modlogdata, $lang->deleted_selective_posts); moderation_redirect($url, $lang->redirect_postsdeleted);
| $lang->deleted_selective_posts = $lang->sprintf($lang->deleted_selective_posts, $deletecount); log_moderator_action($modlogdata, $lang->deleted_selective_posts); moderation_redirect($url, $lang->redirect_postsdeleted);
|
Zeile 443 | Zeile 446 |
---|
"); $altbg = "trow1"; while($post = $db->fetch_array($query))
|
"); $altbg = "trow1"; while($post = $db->fetch_array($query))
|
{
| {
|
$postdate = my_date($mybb->settings['dateformat'], $post['dateline']); $posttime = my_date($mybb->settings['timeformat'], $post['dateline']); $parser_options = array(
| $postdate = my_date($mybb->settings['dateformat'], $post['dateline']); $posttime = my_date($mybb->settings['timeformat'], $post['dateline']); $parser_options = array(
|
Zeile 462 | Zeile 465 |
---|
eval("\$posts .= \"".$templates->get("moderation_mergeposts_post")."\";"); $altbg = alt_trow(); }
|
eval("\$posts .= \"".$templates->get("moderation_mergeposts_post")."\";"); $altbg = alt_trow(); }
|
|
|
$plugins->run_hooks("moderation_mergeposts");
eval("\$mergeposts = \"".$templates->get("moderation_mergeposts")."\";"); output_page($mergeposts); break;
|
$plugins->run_hooks("moderation_mergeposts");
eval("\$mergeposts = \"".$templates->get("moderation_mergeposts")."\";"); output_page($mergeposts); break;
|
|
|
// Lets merge those selected posts! case "do_mergeposts":
| // Lets merge those selected posts! case "do_mergeposts":
|
Zeile 478 | Zeile 481 |
---|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
}
| }
|
$plugins->run_hooks("moderation_do_mergeposts");
|
$plugins->run_hooks("moderation_do_mergeposts");
|
|
|
$mergepost = $mybb->input['mergepost']; if(count($mergepost) <= 1) { error($lang->error_nomergeposts);
|
$mergepost = $mybb->input['mergepost']; if(count($mergepost) <= 1) { error($lang->error_nomergeposts);
|
}
| }
|
foreach($mergepost as $pid => $yes)
|
foreach($mergepost as $pid => $yes)
|
{ $plist[] = intval($pid); } $moderation->merge_posts($plist, $tid, $mybb->input['sep']);
| { $plist[] = intval($pid); } $moderation->merge_posts($plist, $tid, $mybb->input['sep']);
|
mark_reports($plist, "posts"); log_moderator_action($modlogdata, $lang->merged_selective_posts);
| mark_reports($plist, "posts"); log_moderator_action($modlogdata, $lang->merged_selective_posts);
|
Zeile 509 | Zeile 512 |
---|
$plugins->run_hooks("moderation_move");
|
$plugins->run_hooks("moderation_move");
|
$forumselect = build_forum_jump("", '', 1, '', 0, '', "moveto");
| $forumselect = build_forum_jump("", '', 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 563 | Zeile 566 |
---|
{ case "copy": log_moderator_action($modlogdata, $lang->thread_copied);
|
{ case "copy": log_moderator_action($modlogdata, $lang->thread_copied);
|
break;
| break;
|
default: case "move": case "redirect":
| default: case "move": case "redirect":
|
Zeile 628 | Zeile 631 |
---|
// Update the thread notes! case "do_threadnotes":
|
// Update the thread notes! case "do_threadnotes":
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
$plugins->run_hooks("moderation_do_threadnotes");
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
$plugins->run_hooks("moderation_do_threadnotes");
|
log_moderator_action($modlogdata, $lang->thread_notes_edited); $sqlarray = array(
| log_moderator_action($modlogdata, $lang->thread_notes_edited); $sqlarray = array(
|
Zeile 687 | Zeile 690 |
---|
break;
// Lets get those threads together baby! (Merge threads)
|
break;
// Lets get those threads together baby! (Merge threads)
|
case "do_merge":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
| case "do_merge":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
Zeile 824 | Zeile 827 |
---|
eval("\$posts .= \"".$templates->get("moderation_split_post")."\";"); $altbg = alt_trow(); }
|
eval("\$posts .= \"".$templates->get("moderation_split_post")."\";"); $altbg = alt_trow(); }
|
$forumselect = build_forum_jump("", $fid, 1, '', 0, '', "moveto");
| $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
$plugins->run_hooks("moderation_split");
| $plugins->run_hooks("moderation_split");
|
Zeile 1060 | Zeile 1063 |
---|
break;
// Approve threads - Inline moderation
|
break;
// Approve threads - Inline moderation
|
case "multiapprovethreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads')) { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
| case "multiapprovethreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads')) { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
|
$moderation->approve_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_approved_threads); if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search');
|
$moderation->approve_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_approved_threads); if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search');
|
}
| }
|
else { clearinline($fid, 'forum');
| else { clearinline($fid, 'forum');
|
Zeile 1103 | Zeile 1106 |
---|
break;
// Unapprove threads - Inline moderation
|
break;
// Unapprove threads - Inline moderation
|
case "multiunapprovethreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->input['searchid'], 'search');
| case "multiunapprovethreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->input['searchid'], 'search');
|
if(!is_moderator_by_tids($threads, 'canmanagethreads'))
|
if(!is_moderator_by_tids($threads, 'canmanagethreads'))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
} else
|
} else
|
{
| {
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads')) { error_no_permission(); }
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads')) { error_no_permission(); }
|
}
| }
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
| if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
Zeile 1133 | Zeile 1136 |
---|
$moderation->unapprove_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
|
$moderation->unapprove_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
|
if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); } else
| if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); } else
|
{ clearinline($fid, 'forum'); } $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunapproved); break;
|
{ clearinline($fid, 'forum'); } $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunapproved); break;
|
|
|
// Stick threads - Inline moderation
|
// Stick threads - Inline moderation
|
case "multistickthreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads')) { error_no_permission(); } } else {
| case "multistickthreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads')) { error_no_permission(); } } else {
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads')) { error_no_permission(); }
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads')) { error_no_permission(); }
|
}
| }
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
| if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
Zeile 1179 | Zeile 1182 |
---|
if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search');
|
if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search');
|
}
| }
|
else { clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsstuck);
|
else { clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsstuck);
|
break;
| break;
|
// Unstick threads - Inline moderaton case "multiunstickthreads":
| // Unstick threads - Inline moderaton case "multiunstickthreads":
|
Zeile 1198 | Zeile 1201 |
---|
// From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
|
// From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
} else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads'))
|
} else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads'))
|
{ error_no_permission(); } } if(count($threads) < 1)
| { error_no_permission(); } } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected); }
|
Zeile 1264 | Zeile 1267 |
---|
{ clearinline($fid, 'forum'); }
|
{ clearinline($fid, 'forum'); }
|
$forumselect = build_forum_jump("", '', 1, '', 0, '', "moveto");
| $forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto");
|
$return_url = htmlspecialchars_uni($mybb->input['url']); eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";"); output_page($movethread);
| $return_url = htmlspecialchars_uni($mybb->input['url']); eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";"); output_page($movethread);
|
Zeile 1285 | Zeile 1288 |
---|
foreach($threadlist as $tid) { $tids[] = intval($tid);
|
foreach($threadlist as $tid) { $tids[] = intval($tid);
|
}
| }
|
// Make sure moderator has permission to move to the new forum $newperms = forum_permissions($moveto); if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, 'canmovetononmodforum'))
| // Make sure moderator has permission to move to the new forum $newperms = forum_permissions($moveto); if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, 'canmovetononmodforum'))
|
Zeile 1324 | Zeile 1327 |
---|
error($lang->error_inline_nopostsselected); } if(!is_moderator_by_pids($posts, "candeleteposts"))
|
error($lang->error_inline_nopostsselected); } if(!is_moderator_by_pids($posts, "candeleteposts"))
|
{ error_no_permission(); } $inlineids = implode("|", $posts); if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); }
| { error_no_permission(); } $inlineids = implode("|", $posts); if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); }
|
else { clearinline($tid, 'thread');
|
else { clearinline($tid, 'thread');
|
} $return_url = htmlspecialchars_uni($mybb->input['url']);
| } $return_url = htmlspecialchars_uni($mybb->input['url']);
|
eval("\$multidelete = \"".$templates->get("moderation_inline_deleteposts")."\";"); output_page($multidelete); break;
|
eval("\$multidelete = \"".$templates->get("moderation_inline_deleteposts")."\";"); output_page($multidelete); break;
|
|
|
// Actually delete the posts in inline moderation case "do_multideleteposts":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
// Actually delete the posts in inline moderation case "do_multideleteposts":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
|
|
$postlist = explode("|", $mybb->input['posts']); if(!is_moderator_by_pids($postlist, "candeleteposts"))
|
$postlist = explode("|", $mybb->input['posts']); if(!is_moderator_by_pids($postlist, "candeleteposts"))
|
{
| {
|
error_no_permission(); }
|
error_no_permission(); }
|
| $postlist = array_map('intval', $postlist); $pids = implode(',', $postlist); $tids = array(); if($pids) { $query = $db->simple_select("threads", "tid", "firstpost IN({$pids})"); while($tid = $db->fetch_field($query, "tid")) { $tids[] = $tid; } }
|
$deletecount = 0; foreach($postlist as $pid) {
| $deletecount = 0; foreach($postlist as $pid) {
|
Zeile 1362 | Zeile 1378 |
---|
$plist[] = $pid; $deletecount++; }
|
$plist[] = $pid; $deletecount++; }
|
$query = $db->simple_select("posts", "*", "tid='$tid'"); $numposts = $db->num_rows($query); if(!$numposts) { $moderation->delete_thread($tid); mark_reports($tid, "thread"); $url = get_forum_link($fid);
| // If we have multiple threads, we must be coming from the search if(!empty($tids)) { foreach($tids as $tid) { $moderation->delete_thread($tid); mark_reports($tid, "thread"); $url = get_forum_link($fid); }
|
}
|
}
|
| // Otherwise we're just deleting from showthread.php
|
else {
|
else {
|
mark_reports($plist, "posts"); $url = get_thread_link($thread['tid']);
| $query = $db->simple_select("posts", "*", "tid='$tid'"); $numposts = $db->num_rows($query); if(!$numposts) { $moderation->delete_thread($tid); mark_reports($tid, "thread"); $url = get_forum_link($fid); } else { mark_reports($plist, "posts"); $url = get_thread_link($thread['tid']); }
|
}
|
}
|
|
|
$lang->deleted_selective_posts = $lang->sprintf($lang->deleted_selective_posts, $deletecount); log_moderator_action($modlogdata, $lang->deleted_selective_posts); moderation_redirect($url, $lang->redirect_postsdeleted);
|
$lang->deleted_selective_posts = $lang->sprintf($lang->deleted_selective_posts, $deletecount); log_moderator_action($modlogdata, $lang->deleted_selective_posts); moderation_redirect($url, $lang->redirect_postsdeleted);
|
break;
| break;
|
// Merge posts - Inline moderation case "multimergeposts":
| // Merge posts - Inline moderation case "multimergeposts":
|
Zeile 1387 | Zeile 1419 |
---|
if($mybb->input['inlinetype'] == 'search') { $posts = getids($mybb->input['searchid'], 'search');
|
if($mybb->input['inlinetype'] == 'search') { $posts = getids($mybb->input['searchid'], 'search');
|
}
| }
|
else { $posts = getids($tid, 'thread'); } if(count($posts) < 1)
|
else { $posts = getids($tid, 'thread'); } if(count($posts) < 1)
|
{
| {
|
error($lang->error_inline_nopostsselected); } if(!is_moderator_by_pids($posts, "canmanagethreads"))
| error($lang->error_inline_nopostsselected); } if(!is_moderator_by_pids($posts, "canmanagethreads"))
|
Zeile 1401 | Zeile 1433 |
---|
error_no_permission(); } $inlineids = implode("|", $posts);
|
error_no_permission(); } $inlineids = implode("|", $posts);
|
if($mybb->input['inlinetype'] == 'search')
| if($mybb->input['inlinetype'] == 'search')
|
{ clearinline($mybb->input['searchid'], 'search'); }
| { clearinline($mybb->input['searchid'], 'search'); }
|
Zeile 1447 | Zeile 1479 |
---|
add_breadcrumb($lang->nav_multi_splitposts); if($mybb->input['inlinetype'] == 'search')
|
add_breadcrumb($lang->nav_multi_splitposts); if($mybb->input['inlinetype'] == 'search')
|
{
| {
|
$posts = getids($mybb->input['searchid'], 'search'); } else { $posts = getids($tid, 'thread');
|
$posts = getids($mybb->input['searchid'], 'search'); } else { $posts = getids($tid, 'thread');
|
}
| }
|
if(count($posts) < 1)
|
if(count($posts) < 1)
|
{
| {
|
error($lang->error_inline_nopostsselected); }
| error($lang->error_inline_nopostsselected); }
|
Zeile 1464 | Zeile 1496 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
array_walk($posts, 'intval');
| $posts = array_map('intval', $posts);
|
$pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post // Select number of posts in each thread that the splitted post is in $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count
|
$pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post // Select number of posts in each thread that the splitted post is in $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count
|
FROM (".TABLE_PREFIX."posts p, ".TABLE_PREFIX."posts q) WHERE p.tid=q.tid AND p.pid IN ($pidin)
| FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin)
|
GROUP BY p.pid
|
GROUP BY p.pid
|
");
| ");
|
$threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) {
| $threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) {
|
Zeile 1517 | Zeile 1550 |
---|
{ clearinline($tid, 'thread'); }
|
{ clearinline($tid, 'thread'); }
|
$forumselect = build_forum_jump("", $fid, 1, '', 0, '', "moveto");
| $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";"); output_page($splitposts); break;
| eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";"); output_page($splitposts); break;
|
Zeile 1685 | Zeile 1718 |
---|
if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search');
|
if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search');
|
$lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']); redirect($mybb->input['url'], $lang->redirect_customtool_search);
| $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']); $return_url = htmlspecialchars_uni($mybb->input['url']); redirect($return_url, $lang->redirect_customtool_search);
|
} else {
| } else {
|
Zeile 1756 | Zeile 1790 |
---|
{ clearinline($mybb->input['searchid'], 'search'); $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
|
{ clearinline($mybb->input['searchid'], 'search'); $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
|
redirect($mybb->input['url'], $lang->redirect_customtool_search);
| $return_url = htmlspecialchars_uni($mybb->input['url']); redirect($return_url, $lang->redirect_customtool_search);
|
} else {
| } else {
|
Zeile 1838 | Zeile 1873 |
---|
$posts = array($posts); } // Validate input
|
$posts = array($posts); } // Validate input
|
array_walk($posts, 'intval');
| $posts = array_map('intval', $posts);
|
$posts[] = 0; // Get forums $posts_string = implode(',', $posts);
| $posts[] = 0; // Get forums $posts_string = implode(',', $posts);
|
Zeile 1882 | Zeile 1917 |
---|
$threads = array($threads); } // Validate input
|
$threads = array($threads); } // Validate input
|
array_walk($threads, 'intval');
| $threads = array_map('intval', $threads);
|
$threads[] = 0; // Get forums $threads_string = implode(',', $threads);
| $threads[] = 0; // Get forums $threads_string = implode(',', $threads);
|
Zeile 1908 | Zeile 1943 |
---|
global $mybb; if(!empty($mybb->input['url'])) {
|
global $mybb; if(!empty($mybb->input['url'])) {
|
redirect($mybb->input['url'], $message, $title);
| redirect(htmlentities($mybb->input['url']), $message, $title);
|
} redirect($url, $message, $title); }
| } redirect($url, $message, $title); }
|