Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html *
|
* $Id: moderation.php 3515 2007-11-24 09:05:33Z Tikitiki $
| * $Id: moderation.php 3641 2008-02-09 16:51:41Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 99 | Zeile 99 |
---|
{ // Open or close a thread case "openclosethread":
|
{ // Open or close a thread case "openclosethread":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canopenclosethreads") != "yes")
|
if(is_moderator($fid, "canopenclosethreads") != "yes")
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
$plugins->run_hooks("moderation_openclosethread");
| }
$plugins->run_hooks("moderation_openclosethread");
|
if($thread['closed'] == "yes")
|
if($thread['closed'] == "yes")
|
{
| {
|
$openclose = $lang->opened; $redirect = $lang->redirect_openthread; $moderation->open_threads($tid);
| $openclose = $lang->opened; $redirect = $lang->redirect_openthread; $moderation->open_threads($tid);
|
Zeile 117 | Zeile 120 |
---|
$openclose = $lang->closed; $redirect = $lang->redirect_closethread; $moderation->close_threads($tid);
|
$openclose = $lang->closed; $redirect = $lang->redirect_closethread; $moderation->close_threads($tid);
|
}
$lang->mod_process = sprintf($lang->mod_process, $openclose);
| }
$lang->mod_process = sprintf($lang->mod_process, $openclose);
|
log_moderator_action($modlogdata, $lang->mod_process);
redirect("showthread.php?tid=$tid", $redirect);
| log_moderator_action($modlogdata, $lang->mod_process);
redirect("showthread.php?tid=$tid", $redirect);
|
Zeile 128 | Zeile 131 |
---|
// Stick or unstick that post to the top bab! case "stick";
|
// Stick or unstick that post to the top bab! case "stick";
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canmanagethreads") != "yes")
|
if(is_moderator($fid, "canmanagethreads") != "yes")
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
| }
|
$plugins->run_hooks("moderation_stick");
| $plugins->run_hooks("moderation_stick");
|
Zeile 142 | Zeile 148 |
---|
$moderation->unstick_threads($tid); } else
|
$moderation->unstick_threads($tid); } else
|
{
| {
|
$stuckunstuck = $lang->stuck; $redirect = $lang->redirect_stickthread; $moderation->stick_threads($tid);
| $stuckunstuck = $lang->stuck; $redirect = $lang->redirect_stickthread; $moderation->stick_threads($tid);
|
Zeile 150 | Zeile 156 |
---|
$lang->mod_process = sprintf($lang->mod_process, $stuckunstuck);
|
$lang->mod_process = sprintf($lang->mod_process, $stuckunstuck);
|
log_moderator_action($modlogdata, $lang->mod_process);
| log_moderator_action($modlogdata, $lang->mod_process);
|
redirect("showthread.php?tid=$tid", $redirect); break;
// Remove redirects to a specific thread case "removeredirects":
|
redirect("showthread.php?tid=$tid", $redirect); break;
// Remove redirects to a specific thread case "removeredirects":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
|
Zeile 192 | Zeile 202 |
---|
// Delete the actual thread here case "do_deletethread":
|
// Delete the actual thread here case "do_deletethread":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "candeleteposts") != "yes") { if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid'])
| if(is_moderator($fid, "candeleteposts") != "yes") { if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid'])
|
Zeile 208 | Zeile 222 |
---|
$thread['subject'] = $db->escape_string($thread['subject']); $lang->thread_deleted = sprintf($lang->thread_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_deleted);
|
$thread['subject'] = $db->escape_string($thread['subject']); $lang->thread_deleted = sprintf($lang->thread_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_deleted);
|
|
|
$moderation->delete_thread($tid);
|
$moderation->delete_thread($tid);
|
|
|
mark_reports($tid, "thread"); redirect("forumdisplay.php?fid=$fid", $lang->redirect_threaddeleted); break;
|
mark_reports($tid, "thread"); redirect("forumdisplay.php?fid=$fid", $lang->redirect_threaddeleted); break;
|
|
|
// 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") != "yes") { if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
$plugins->run_hooks("moderation_deletepoll");
$query = $db->simple_select(TABLE_PREFIX."polls", "*", "tid='$tid'"); $poll = $db->fetch_array($query);
| if(is_moderator($fid, "candeleteposts") != "yes") { if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
$plugins->run_hooks("moderation_deletepoll");
$query = $db->simple_select(TABLE_PREFIX."polls", "*", "tid='$tid'"); $poll = $db->fetch_array($query);
|
if(!$poll['pid']) { error($lang->error_invalidpoll);
| if(!$poll['pid']) { error($lang->error_invalidpoll);
|
Zeile 242 | Zeile 256 |
---|
// 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']);
|
if(!$mybb->input['delete']) { error($lang->redirect_pollnotdeleted);
| if(!$mybb->input['delete']) { error($lang->redirect_pollnotdeleted);
|
Zeile 252 | Zeile 269 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
}
| }
|
$query = $db->simple_select(TABLE_PREFIX."polls", "*", "tid='$tid'"); $poll = $db->fetch_array($query); if(!$poll['pid'])
|
$query = $db->simple_select(TABLE_PREFIX."polls", "*", "tid='$tid'"); $poll = $db->fetch_array($query); if(!$poll['pid'])
|
{
| {
|
error($lang->error_invalidpoll); }
|
error($lang->error_invalidpoll); }
|
|
|
$plugins->run_hooks("moderation_do_deletepoll");
|
$plugins->run_hooks("moderation_do_deletepoll");
|
|
|
$lang->poll_deleted = sprintf($lang->poll_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->poll_deleted);
|
$lang->poll_deleted = sprintf($lang->poll_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->poll_deleted);
|
|
|
$moderation->delete_poll($poll['pid']);
|
$moderation->delete_poll($poll['pid']);
|
|
|
redirect("showthread.php?tid=$tid", $lang->redirect_polldeleted); break;
// Approve a thread case "approvethread":
|
redirect("showthread.php?tid=$tid", $lang->redirect_polldeleted); break;
// Approve a thread case "approvethread":
|
if(is_moderator($fid, "canopenclosethreads") != "yes") {
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']); if(is_moderator($fid, "canopenclosethreads") != "yes") {
|
error_no_permission(); } $query = $db->simple_select(TABLE_PREFIX."threads", "*", "tid='$tid'"); $thread = $db->fetch_array($query);
|
error_no_permission(); } $query = $db->simple_select(TABLE_PREFIX."threads", "*", "tid='$tid'"); $thread = $db->fetch_array($query);
|
$plugins->run_hooks("moderation_approvethread");
| $plugins->run_hooks("moderation_approvethread");
|
$lang->thread_approved = sprintf($lang->thread_approved, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_approved);
| $lang->thread_approved = sprintf($lang->thread_approved, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_approved);
|
Zeile 291 | Zeile 311 |
---|
// Unapprove a thread case "unapprovethread":
|
// Unapprove a thread case "unapprovethread":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canopenclosethreads") != "yes") { error_no_permission();
| if(is_moderator($fid, "canopenclosethreads") != "yes") { error_no_permission();
|
Zeile 311 | Zeile 334 |
---|
// 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") != "yes") { error_no_permission(); } $posts = ""; $query = $db->query(" SELECT p.*, u.*
| if(is_moderator($fid, "candeleteposts") != "yes") { 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'] ); if($post['smilieoff'] == "yes") { $parser_options['allow_smilies'] = "no"; }
| 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'] ); if($post['smilieoff'] == "yes") { $parser_options['allow_smilies'] = "no"; }
|
$message = $parser->parse_message($post['message'], $parser_options); eval("\$posts .= \"".$templates->get("moderation_deleteposts_post")."\";"); $altbg = alt_trow(); }
|
$message = $parser->parse_message($post['message'], $parser_options); eval("\$posts .= \"".$templates->get("moderation_deleteposts_post")."\";"); $altbg = alt_trow(); }
|
$plugins->run_hooks("moderation_deleteposts");
| $plugins->run_hooks("moderation_deleteposts");
|
eval("\$deleteposts = \"".$templates->get("moderation_deleteposts")."\";"); output_page($deleteposts); break;
// Lets delete those selected posts! case "do_deleteposts":
|
eval("\$deleteposts = \"".$templates->get("moderation_deleteposts")."\";"); output_page($deleteposts); break;
// Lets delete those selected posts! case "do_deleteposts":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "candeleteposts") != "yes") { error_no_permission();
| if(is_moderator($fid, "candeleteposts") != "yes") { error_no_permission();
|
Zeile 380 | Zeile 406 |
---|
{ $moderation->delete_thread($tid); $url = "forumdisplay.php?fid=$fid";
|
{ $moderation->delete_thread($tid); $url = "forumdisplay.php?fid=$fid";
|
mark_reports($plist, "posts"); } else {
| mark_reports($plist, "posts"); } else {
|
$url = "showthread.php?tid=$tid"; mark_reports($tid, "thread"); }
| $url = "showthread.php?tid=$tid"; mark_reports($tid, "thread"); }
|
Zeile 427 | Zeile 453 |
---|
$message = $parser->parse_message($post['message'], $parser_options); eval("\$posts .= \"".$templates->get("moderation_mergeposts_post")."\";"); $altbg = alt_trow();
|
$message = $parser->parse_message($post['message'], $parser_options); 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":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canmanagethreads") != "yes")
|
if(is_moderator($fid, "canmanagethreads") != "yes")
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
| }
|
$plugins->run_hooks("moderation_do_mergeposts");
$mergepost = $mybb->input['mergepost']; if(count($mergepost) <= 1)
|
$plugins->run_hooks("moderation_do_mergeposts");
$mergepost = $mybb->input['mergepost']; if(count($mergepost) <= 1)
|
{ error($lang->error_nomergeposts); }
| { error($lang->error_nomergeposts); }
|
foreach($mergepost as $pid => $yes) { $plist[] = $pid; } $moderation->merge_posts($plist, $tid, $mybb->input['sep']);
|
foreach($mergepost as $pid => $yes) { $plist[] = $pid; } $moderation->merge_posts($plist, $tid, $mybb->input['sep']);
|
|
|
mark_reports($plist, "posts"); log_moderator_action($modlogdata, $lang->merged_selective_posts); redirect("showthread.php?tid=$tid", $lang->redirect_mergeposts);
| mark_reports($plist, "posts"); log_moderator_action($modlogdata, $lang->merged_selective_posts); redirect("showthread.php?tid=$tid", $lang->redirect_mergeposts);
|
Zeile 464 | Zeile 493 |
---|
// Move a thread case "move": add_breadcrumb($lang->nav_move);
|
// Move a thread case "move": add_breadcrumb($lang->nav_move);
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
|
}
$plugins->run_hooks("moderation_move");
| }
$plugins->run_hooks("moderation_move");
|
Zeile 478 | Zeile 507 |
---|
// Lets get this thing moving! case "do_move":
|
// Lets get this thing moving! case "do_move":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$moveto = intval($mybb->input['moveto']); $method = $mybb->input['method'];
|
$moveto = intval($mybb->input['moveto']); $method = $mybb->input['method'];
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
|
} // Check if user has moderator permission to move to destination if(is_moderator($moveto, "canmanagethreads") != "yes" && is_moderator($fid, "canmovetononmodforum") != "yes")
| } // Check if user has moderator permission to move to destination if(is_moderator($moveto, "canmanagethreads") != "yes" && is_moderator($fid, "canmovetononmodforum") != "yes")
|
Zeile 587 | Zeile 619 |
---|
// 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") != "yes") { error_no_permission();
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
|
Zeile 643 | Zeile 678 |
---|
// Lets get those threads together baby! (Merge threads) case "do_merge":
|
// Lets get those threads together baby! (Merge threads) case "do_merge":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canmanagethreads") != "yes")
|
if(is_moderator($fid, "canmanagethreads") != "yes")
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
| }
|
$plugins->run_hooks("moderation_do_merge");
| $plugins->run_hooks("moderation_do_merge");
|
Zeile 654 | Zeile 692 |
---|
$splitloc = explode(".php", $mybb->input['threadurl']); $temp = explode("&", my_substr($splitloc[1], 1)); if(!empty($temp))
|
$splitloc = explode(".php", $mybb->input['threadurl']); $temp = explode("&", my_substr($splitloc[1], 1)); if(!empty($temp))
|
{
| {
|
for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2); $parameters[$temp2[0]] = $temp2[1];
|
for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2); $parameters[$temp2[0]] = $temp2[1];
|
} } else {
| } } else {
|
$temp2 = explode("=", $splitloc[1], 2); $parameters[$temp2[0]] = $temp2[1];
|
$temp2 = explode("=", $splitloc[1], 2); $parameters[$temp2[0]] = $temp2[1];
|
}
| }
|
if($parameters['pid'] && !$parameters['tid']) { $query = $db->simple_select(TABLE_PREFIX."posts", "*", "pid='".intval($parameters['pid'])."'"); $post = $db->fetch_array($query); $mergetid = $post['tid'];
|
if($parameters['pid'] && !$parameters['tid']) { $query = $db->simple_select(TABLE_PREFIX."posts", "*", "pid='".intval($parameters['pid'])."'"); $post = $db->fetch_array($query); $mergetid = $post['tid'];
|
}
| }
|
elseif($parameters['tid']) { $mergetid = $parameters['tid'];
| elseif($parameters['tid']) { $mergetid = $parameters['tid'];
|
Zeile 681 | Zeile 719 |
---|
$query = $db->simple_select(TABLE_PREFIX."threads", "*", "tid='".intval($mergetid)."'"); $mergethread = $db->fetch_array($query); if(!$mergethread['tid'])
|
$query = $db->simple_select(TABLE_PREFIX."threads", "*", "tid='".intval($mergetid)."'"); $mergethread = $db->fetch_array($query); if(!$mergethread['tid'])
|
{
| {
|
error($lang->error_badmergeurl);
|
error($lang->error_badmergeurl);
|
}
| }
|
if($mergetid == $tid) { // sanity check error($lang->error_mergewithself);
|
if($mergetid == $tid) { // sanity check error($lang->error_mergewithself);
|
}
| }
|
if(is_moderator($mergethread['fid'], "canmanagethreads") != "yes")
|
if(is_moderator($mergethread['fid'], "canmanagethreads") != "yes")
|
{
| {
|
error_no_permission(); } if($mybb->input['subject'])
| error_no_permission(); } if($mybb->input['subject'])
|
Zeile 699 | Zeile 737 |
---|
else { $subject = $thread['subject'];
|
else { $subject = $thread['subject'];
|
}
$moderation->merge_threads($mergetid, $tid, $subject);
| }
$moderation->merge_threads($mergetid, $tid, $subject);
|
log_moderator_action($modlogdata, $lang->thread_merged);
| log_moderator_action($modlogdata, $lang->thread_merged);
|
Zeile 759 | Zeile 797 |
---|
// Lets break them up buddy! (Do the split) case "do_split":
|
// Lets break them up buddy! (Do the split) case "do_split":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
|
Zeile 798 | Zeile 839 |
---|
if($mybb->input['splitpost'][$post['pid']] == "yes") { $pids[] = $post['pid'];
|
if($mybb->input['splitpost'][$post['pid']] == "yes") { $pids[] = $post['pid'];
|
}
| }
|
mark_reports($post['pid'], "post");
|
mark_reports($post['pid'], "post");
|
}
$newtid = $moderation->split_posts($pids, $tid, $moveto, $mybb->input['newsubject']);
| }
$newtid = $moderation->split_posts($pids, $tid, $moveto, $mybb->input['newsubject']);
|
log_moderator_action($modlogdata, $lang->thread_split);
| log_moderator_action($modlogdata, $lang->thread_split);
|
Zeile 812 | Zeile 853 |
---|
// Delete Threads - Inline moderation case "multideletethreads": add_breadcrumb($lang->nav_multi_deletethreads);
|
// Delete Threads - Inline moderation case "multideletethreads": add_breadcrumb($lang->nav_multi_deletethreads);
|
if(is_moderator($fid, "candeleteposts") != "yes") { error_no_permission(); } $threads = getids($fid, "forum"); if(count($threads) < 1)
| if(is_moderator($fid, "candeleteposts") != "yes") { error_no_permission(); } $threads = getids($fid, "forum"); if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected); }
|
Zeile 830 | Zeile 871 |
---|
// Actually delete the threads - Inline moderation case "do_multideletethreads":
|
// Actually delete the threads - Inline moderation case "do_multideletethreads":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "candeleteposts") != "yes") { error_no_permission();
| if(is_moderator($fid, "candeleteposts") != "yes") { error_no_permission();
|
Zeile 850 | Zeile 894 |
---|
// Open threads - Inline moderation case "multiopenthreads":
|
// Open threads - Inline moderation case "multiopenthreads":
|
if(is_moderator($fid, "canopenclosethreads") != "yes") { error_no_permission(); } $threads = getids($fid, "forum");
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']); if(is_moderator($fid, "canopenclosethreads") != "yes") { error_no_permission(); } $threads = getids($fid, "forum");
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
|
$moderation->open_threads($threads);
| $moderation->open_threads($threads);
|
log_moderator_action($modlogdata, $lang->multi_opened_threads); clearinline($fid, "forum"); redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsopened);
| log_moderator_action($modlogdata, $lang->multi_opened_threads); clearinline($fid, "forum"); redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsopened);
|
Zeile 869 | Zeile 916 |
---|
// Close threads - Inline moderation case "multiclosethreads":
|
// Close threads - Inline moderation case "multiclosethreads":
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']); if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
|
$threads = getids($fid, "forum"); if(count($threads) < 1) {
| $threads = getids($fid, "forum"); if(count($threads) < 1) {
|
Zeile 888 | Zeile 938 |
---|
// Approve threads - Inline moderation case "multiapprovethreads":
|
// Approve threads - Inline moderation case "multiapprovethreads":
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']); if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
|
$threads = getids($fid, "forum"); if(count($threads) < 1) {
| $threads = getids($fid, "forum"); if(count($threads) < 1) {
|
Zeile 908 | Zeile 961 |
---|
// Unapprove threads - Inline moderation case "multiunapprovethreads":
|
// Unapprove threads - Inline moderation case "multiunapprovethreads":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canmanagethreads") != "yes")
|
if(is_moderator($fid, "canmanagethreads") != "yes")
|
{
| {
|
error_no_permission(); } $threads = getids($fid, "forum");
| error_no_permission(); } $threads = getids($fid, "forum");
|
Zeile 928 | Zeile 984 |
---|
// Stick threads - Inline moderation case "multistickthreads":
|
// Stick threads - Inline moderation case "multistickthreads":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canopenclosethreads") != "yes") { error_no_permission();
| if(is_moderator($fid, "canopenclosethreads") != "yes") { error_no_permission();
|
Zeile 947 | Zeile 1006 |
---|
// Unstick threads - Inline moderaton case "multiunstickthreads":
|
// Unstick threads - Inline moderaton case "multiunstickthreads":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canopenclosethreads") != "yes") { error_no_permission();
| if(is_moderator($fid, "canopenclosethreads") != "yes") { error_no_permission();
|
Zeile 989 | Zeile 1051 |
---|
// Actually move the threads in Inline moderation case "do_multimovethreads":
|
// Actually move the threads in Inline moderation case "do_multimovethreads":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
|
Zeile 1050 | Zeile 1115 |
---|
// Actually delete the posts in inline moderation case "do_multideleteposts":
|
// Actually delete the posts in inline moderation case "do_multideleteposts":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "candeleteposts") != "yes") { error_no_permission();
| if(is_moderator($fid, "candeleteposts") != "yes") { error_no_permission();
|
Zeile 1085 | Zeile 1153 |
---|
// Merge posts - Inline moderation case "multimergeposts": add_breadcrumb($lang->nav_multi_mergeposts);
|
// Merge posts - Inline moderation case "multimergeposts": add_breadcrumb($lang->nav_multi_mergeposts);
|
if(is_moderator($fid, "candeleteposts") != "yes") { error_no_permission(); }
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
|
$posts = getids($tid, "thread"); if(count($posts) < 1) {
| $posts = getids($tid, "thread"); if(count($posts) < 1) {
|
Zeile 1103 | Zeile 1171 |
---|
// Actually merge the posts - Inline moderation case "do_multimergeposts":
|
// Actually merge the posts - Inline moderation case "do_multimergeposts":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
|
Zeile 1147 | Zeile 1218 |
---|
} $pidin = ''; $comma = '';
|
} $pidin = ''; $comma = '';
|
foreach($posts as $pid) {
| foreach($posts as $pid) {
|
$pid = intval($pid); $pidin .= "$comma'$pid'"; $comma = ",";
| $pid = intval($pid); $pidin .= "$comma'$pid'"; $comma = ",";
|
Zeile 1169 | Zeile 1240 |
---|
// Actually split the posts - Inline moderation case "do_multisplitposts":
|
// Actually split the posts - Inline moderation case "do_multisplitposts":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
|
Zeile 1207 | Zeile 1281 |
---|
// Approve posts - Inline moderation case "multiapproveposts":
|
// Approve posts - Inline moderation case "multiapproveposts":
|
if(is_moderator($fid, "canmanagethreads") != "yes")
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']); if(is_moderator($fid, "canmanagethreads") != "yes")
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 1232 | Zeile 1309 |
---|
// Unapprove posts - Inline moderation case "multiunapproveposts":
|
// Unapprove posts - Inline moderation case "multiunapproveposts":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission();
|
Zeile 1256 | Zeile 1336 |
---|
// Manage selected reported posts case "do_reports":
|
// Manage selected reported posts case "do_reports":
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(is_moderator() != "yes")
|
if(is_moderator() != "yes")
|
{
| {
|
error_no_permission(); } $flist = '';
| error_no_permission(); } $flist = '';
|
Zeile 1267 | Zeile 1350 |
---|
while($forum = $db->fetch_array($query)) { $flist .= ",'".$forum['fid']."'";
|
while($forum = $db->fetch_array($query)) { $flist .= ",'".$forum['fid']."'";
|
}
| }
|
} if($flist) {
| } if($flist) {
|
Zeile 1309 | Zeile 1392 |
---|
} $query = $db->simple_select(TABLE_PREFIX."reportedposts", "COUNT(rid) AS count", "reportstatus ='0'");
|
} $query = $db->simple_select(TABLE_PREFIX."reportedposts", "COUNT(rid) AS count", "reportstatus ='0'");
|
$warnings = $db->fetch_field($query, "count"); if($mybb->input['rid']) { $query = $db->simple_select(TABLE_PREFIX."reportedposts", "COUNT(r.rid) AS count", "r.rid <= '".$mybb->input['rid']."'"); $result = $db->fetch_field($query, "count"); if(($result % $perpage) == 0) { $page = $result / $perpage; } else { $page = intval($result / $perpage) + 1; } } $postcount = intval($warnings)+1; $pages = $postcount / $perpage; $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages) { $page = 1; }
if($page) { $start = ($page-1) * $perpage; } else { $start = 0; $page = 1; }
| $warnings = $db->fetch_field($query, "count"); if($mybb->input['rid']) { $query = $db->simple_select(TABLE_PREFIX."reportedposts", "COUNT(r.rid) AS count", "r.rid <= '".intval($mybb->input['rid'])."'"); $result = $db->fetch_field($query, "count"); if(($result % $perpage) == 0) { $page = $result / $perpage; } else { $page = intval($result / $perpage) + 1; } } $postcount = intval($warnings)+1; $pages = $postcount / $perpage; $pages = ceil($pages);
if($mybb->input['page'] == "last") { $page = $pages; }
if($page > $pages) { $page = 1; }
if($page) { $start = ($page-1) * $perpage; } else { $start = 0; $page = 1; }
|
$upper = $start+$perpage;
$multipage = multipage($postcount, $perpage, $page, "moderation.php?action=reports");
| $upper = $start+$perpage;
$multipage = multipage($postcount, $perpage, $page, "moderation.php?action=reports");
|
Zeile 1425 | Zeile 1508 |
---|
$pages = ceil($pages);
if($mybb->input['page'] == "last")
|
$pages = ceil($pages);
if($mybb->input['page'] == "last")
|
{ $page = $pages; }
if($page > $pages) { $page = 1; }
| { $page = $pages; }
if($page > $pages) { $page = 1; }
|
if($page) { $start = ($page-1) * $perpage; } else
|
if($page) { $start = ($page-1) * $perpage; } else
|
{
| {
|
$start = 0; $page = 1;
|
$start = 0; $page = 1;
|
}
| }
|
$upper = $start+$perpage;
|
$upper = $start+$perpage;
|
|
|
$multipage = multipage($postcount, $perpage, $page, "moderation.php?action=allreports"); if($postcount > $perpage)
|
$multipage = multipage($postcount, $perpage, $page, "moderation.php?action=allreports"); if($postcount > $perpage)
|
{
| {
|
eval("\$allreportspages = \"".$templates->get("moderation_allreports_multipage")."\";"); }
| eval("\$allreportspages = \"".$templates->get("moderation_allreports_multipage")."\";"); }
|
Zeile 1455 | Zeile 1538 |
---|
while($forum = $db->fetch_array($query)) { $forums[$forum['fid']] = $forum['name'];
|
while($forum = $db->fetch_array($query)) { $forums[$forum['fid']] = $forum['name'];
|
}
| }
|
$reports = ''; $query = $db->query(" SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject
| $reports = ''; $query = $db->query(" SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject
|
Zeile 1499 | Zeile 1582 |
---|
$tool = $custommod->tool_info(intval($mybb->input['action'])); if($tool !== false) {
|
$tool = $custommod->tool_info(intval($mybb->input['action'])); if($tool !== false) {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$plugins->run_hooks("moderation_custommod"); if($tool['type'] == 't' && $mybb->input['modtype'] == 'inlinethread') {
| $plugins->run_hooks("moderation_custommod"); if($tool['type'] == 't' && $mybb->input['modtype'] == 'inlinethread') {
|