Zeile 3 | Zeile 3 |
---|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html
| * Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html
|
*
|
*
|
* $Id: moderation.php 2164 2006-08-30 06:17:49Z chris $
| * $Id: moderation.php 3515 2007-11-24 09:05:33Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 67 | Zeile 67 |
---|
// Make navigation build_forum_breadcrumb($fid); }
|
// Make navigation build_forum_breadcrumb($fid); }
|
| $thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
|
if($tid)
|
if($tid)
|
{ add_breadcrumb($parser->parse_badwords($thread['subject']), "showthread.php?tid=$thread[tid]");
| { add_breadcrumb($thread['subject'], "showthread.php?tid={$thread['tid']}");
|
$modlogdata['tid'] = $tid;
|
$modlogdata['tid'] = $tid;
|
}
| }
|
// Get our permissions all nice and setup $permissions = forum_permissions($fid);
if($fid) {
|
// Get our permissions all nice and setup $permissions = forum_permissions($fid);
if($fid) {
|
// Password protected forums ......... yhummmmy! check_forum_password($fid, $forum['password']);
| // Check if this forum is password protected and we have a valid password check_forum_password($forum['fid']);
|
}
if($mybb->user['uid'] != 0)
|
}
if($mybb->user['uid'] != 0)
|
{
| {
|
eval("\$loginbox = \"".$templates->get("changeuserbox")."\";"); } else
| eval("\$loginbox = \"".$templates->get("changeuserbox")."\";"); } else
|
Zeile 109 | Zeile 111 |
---|
$openclose = $lang->opened; $redirect = $lang->redirect_openthread; $moderation->open_threads($tid);
|
$openclose = $lang->opened; $redirect = $lang->redirect_openthread; $moderation->open_threads($tid);
|
} else {
| } else {
|
$openclose = $lang->closed; $redirect = $lang->redirect_closethread; $moderation->close_threads($tid);
| $openclose = $lang->closed; $redirect = $lang->redirect_closethread; $moderation->close_threads($tid);
|
Zeile 138 | Zeile 140 |
---|
$stuckunstuck = $lang->unstuck; $redirect = $lang->redirect_unstickthread; $moderation->unstick_threads($tid);
|
$stuckunstuck = $lang->unstuck; $redirect = $lang->redirect_unstickthread; $moderation->unstick_threads($tid);
|
}
| }
|
else { $stuckunstuck = $lang->stuck;
| else { $stuckunstuck = $lang->stuck;
|
Zeile 146 | Zeile 148 |
---|
$moderation->stick_threads($tid); }
|
$moderation->stick_threads($tid); }
|
$lang->mod_process = sprintf($lang->mod_process, $stuckunstuck);
| $lang->mod_process = sprintf($lang->mod_process, $stuckunstuck);
|
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);
|
break;
| break;
|
// Remove redirects to a specific thread case "removeredirects":
| // Remove redirects to a specific thread case "removeredirects":
|
Zeile 179 | Zeile 181 |
---|
error_no_permission(); } }
|
error_no_permission(); } }
|
| $thread['subject'] = htmlspecialchars_uni($thread['subject']);
|
$plugins->run_hooks("moderation_deletethread");
| $plugins->run_hooks("moderation_deletethread");
|
Zeile 240 | Zeile 244 |
---|
case "do_deletepoll": if(!$mybb->input['delete']) {
|
case "do_deletepoll": if(!$mybb->input['delete']) {
|
redirect("showthread.php?tid=$tid", $lang->redirect_pollnotdeleted);
| error($lang->redirect_pollnotdeleted);
|
} if(is_moderator($fid, "candeleteposts") != "yes") {
| } if(is_moderator($fid, "candeleteposts") != "yes") {
|
Zeile 365 | Zeile 369 |
---|
{ $moderation->delete_post($post['pid']); $deletecount++;
|
{ $moderation->delete_post($post['pid']); $deletecount++;
|
$plist[] = $post['pid'];
| $plist[] = intval($post['pid']);
|
} else {
| } else {
|
Zeile 380 | Zeile 384 |
---|
} else {
|
} else {
|
update_thread_count($tid);
| |
$url = "showthread.php?tid=$tid"; mark_reports($tid, "thread"); } $lang->deleted_selective_posts = sprintf($lang->deleted_selective_posts, $deletecount); log_moderator_action($modlogdata, $lang->deleted_selective_posts);
|
$url = "showthread.php?tid=$tid"; mark_reports($tid, "thread"); } $lang->deleted_selective_posts = sprintf($lang->deleted_selective_posts, $deletecount); log_moderator_action($modlogdata, $lang->deleted_selective_posts);
|
update_forum_count($fid);
| |
redirect($url, $lang->redirect_postsdeleted); break;
| redirect($url, $lang->redirect_postsdeleted); break;
|
Zeile 431 | Zeile 433 |
---|
eval("\$mergeposts = \"".$templates->get("moderation_mergeposts")."\";"); output_page($mergeposts);
|
eval("\$mergeposts = \"".$templates->get("moderation_mergeposts")."\";"); output_page($mergeposts);
|
break;
| break;
|
// Lets merge those selected posts! case "do_mergeposts":
| // Lets merge those selected posts! case "do_mergeposts":
|
Zeile 499 | Zeile 501 |
---|
if($newforum['type'] != "f") { error($lang->error_invalidforum);
|
if($newforum['type'] != "f") { error($lang->error_invalidforum);
|
}
| }
|
if($method != "copy" && $thread['fid'] == $moveto)
|
if($method != "copy" && $thread['fid'] == $moveto)
|
{
| {
|
error($lang->error_movetosameforum);
|
error($lang->error_movetosameforum);
|
}
| }
|
$expire = 0; if(intval($mybb->input['redirect_expire']) > 0)
| $expire = 0; if(intval($mybb->input['redirect_expire']) > 0)
|
Zeile 511 | Zeile 513 |
---|
$expire = time() + (intval($mybb->input['redirect_expire']) * 86400); }
|
$expire = time() + (intval($mybb->input['redirect_expire']) * 86400); }
|
$the_thread = $tid;
| $the_thread = $tid;
|
$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);
|
$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);
|
| $plugins->run_hooks("moderation_do_move");
|
switch($method) {
| switch($method) {
|
Zeile 566 | Zeile 570 |
---|
{ $info .= "<strong>$lang->post</strong> <a href=\"showthread.php?tid=".$modaction['tid']."&pid=".$modaction['pid']."#pid".$modaction['pid']."\">".$modaction['psubject']."</a>"; }
|
{ $info .= "<strong>$lang->post</strong> <a href=\"showthread.php?tid=".$modaction['tid']."&pid=".$modaction['pid']."#pid".$modaction['pid']."\">".$modaction['psubject']."</a>"; }
|
|
|
eval("\$modactions .= \"".$templates->get("moderation_threadnotes_modaction")."\";"); $trow = alt_trow(); } if(!$modactions) { $modactions = "<tr><td class=\"trow1\" colspan=\"4\">$lang->no_mod_options</td></tr>";
|
eval("\$modactions .= \"".$templates->get("moderation_threadnotes_modaction")."\";"); $trow = alt_trow(); } if(!$modactions) { $modactions = "<tr><td class=\"trow1\" colspan=\"4\">$lang->no_mod_options</td></tr>";
|
}
| }
|
$plugins->run_hooks("moderation_threadnotes");
eval("\$threadnotes = \"".$templates->get("moderation_threadnotes")."\";");
| $plugins->run_hooks("moderation_threadnotes");
eval("\$threadnotes = \"".$templates->get("moderation_threadnotes")."\";");
|
Zeile 584 | Zeile 588 |
---|
// Update the thread notes! case "do_threadnotes": if(is_moderator($fid, "canmanagethreads") != "yes")
|
// Update the thread notes! case "do_threadnotes": if(is_moderator($fid, "canmanagethreads") != "yes")
|
{ error_no_permission(); }
$plugins->run_hooks("moderation_do_threadnotes");
| { 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 597 | Zeile 601 |
---|
$db->update_query(TABLE_PREFIX."threads", $sqlarray, "tid='$tid'"); redirect("showthread.php?tid=$tid", $lang->redirect_threadnotesupdated); break;
|
$db->update_query(TABLE_PREFIX."threads", $sqlarray, "tid='$tid'"); redirect("showthread.php?tid=$tid", $lang->redirect_threadnotesupdated); break;
|
|
|
// Lets look up the ip address of a post case "getip": add_breadcrumb($lang->nav_getip); if(is_moderator($fid, "canviewips") != "yes")
|
// Lets look up the ip address of a post case "getip": add_breadcrumb($lang->nav_getip); if(is_moderator($fid, "canviewips") != "yes")
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 610 | Zeile 614 |
---|
if(!$hostname || $hostname == $post['ipaddress']) { $hostname = $lang->resolve_fail;
|
if(!$hostname || $hostname == $post['ipaddress']) { $hostname = $lang->resolve_fail;
|
}
| }
|
// Admin options $adminoptions = "";
|
// Admin options $adminoptions = "";
|
if($mybb->usergroup['cancp'] == "yes")
| if($mybb->usergroup['cancp'] == "yes" && $mybb->config['hide_admin_links'] != 1)
|
{ eval("\$adminoptions = \"".$templates->get("moderation_getip_adminoptions")."\";");
|
{ eval("\$adminoptions = \"".$templates->get("moderation_getip_adminoptions")."\";");
|
}
| }
|
eval("\$getip = \"".$templates->get("moderation_getip")."\";"); output_page($getip); break;
|
eval("\$getip = \"".$templates->get("moderation_getip")."\";"); output_page($getip); break;
|
|
|
// Merge threads case "merge": add_breadcrumb($lang->nav_merge);
|
// Merge threads case "merge": add_breadcrumb($lang->nav_merge);
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
$plugins->run_hooks("moderation_merge");
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
$plugins->run_hooks("moderation_merge");
|
eval("\$merge = \"".$templates->get("moderation_merge")."\";"); output_page($merge); break;
| eval("\$merge = \"".$templates->get("moderation_merge")."\";"); output_page($merge); break;
|
Zeile 640 | Zeile 644 |
---|
// Lets get those threads together baby! (Merge threads) case "do_merge": if(is_moderator($fid, "canmanagethreads") != "yes")
|
// Lets get those threads together baby! (Merge threads) case "do_merge": if(is_moderator($fid, "canmanagethreads") != "yes")
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
$plugins->run_hooks("moderation_do_merge");
| }
$plugins->run_hooks("moderation_do_merge");
|
// get thread to merge's tid $splitloc = explode(".php", $mybb->input['threadurl']); $temp = explode("&", my_substr($splitloc[1], 1));
|
// get thread to merge's tid $splitloc = explode(".php", $mybb->input['threadurl']); $temp = explode("&", my_substr($splitloc[1], 1));
|
for($i = 0; $i < count($temp); $i++)
| if(!empty($temp))
|
{
|
{
|
$temp2 = explode("=", $temp[$i], 2);
| for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2); $parameters[$temp2[0]] = $temp2[1]; } } else { $temp2 = explode("=", $splitloc[1], 2);
|
$parameters[$temp2[0]] = $temp2[1]; }
|
$parameters[$temp2[0]] = $temp2[1]; }
|
|
|
if($parameters['pid'] && !$parameters['tid']) { $query = $db->simple_select(TABLE_PREFIX."posts", "*", "pid='".intval($parameters['pid'])."'");
| if($parameters['pid'] && !$parameters['tid']) { $query = $db->simple_select(TABLE_PREFIX."posts", "*", "pid='".intval($parameters['pid'])."'");
|
Zeile 750 | Zeile 763 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
$plugins->run_hooks("moderation_do_split");
| |
if(!is_array($mybb->input['splitpost'])) { error($lang->error_nosplitposts);
|
if(!is_array($mybb->input['splitpost'])) { error($lang->error_nosplitposts);
|
}
| }
|
$query = $db->simple_select(TABLE_PREFIX."posts", "COUNT(*) AS totalposts", "tid='".intval($mybb->input['tid'])."'"); $count = $db->fetch_array($query);
|
$query = $db->simple_select(TABLE_PREFIX."posts", "COUNT(*) AS totalposts", "tid='".intval($mybb->input['tid'])."'"); $count = $db->fetch_array($query);
|
|
|
if($count['totalposts'] == count($mybb->input['splitpost']))
|
if($count['totalposts'] == count($mybb->input['splitpost']))
|
{
| {
|
error($lang->error_cantsplitall); } if($mybb->input['moveto'])
| error($lang->error_cantsplitall); } if($mybb->input['moveto'])
|
Zeile 769 | Zeile 780 |
---|
$moveto = intval($mybb->input['moveto']); } else
|
$moveto = intval($mybb->input['moveto']); } else
|
{
| {
|
$moveto = $fid;
|
$moveto = $fid;
|
}
| }
|
$query = $db->simple_select(TABLE_PREFIX."forums", "fid", "fid='$moveto'", array('limit' => 1)); if($db->num_rows($query) == 0) { error($lang->error_invalidforum); }
|
$query = $db->simple_select(TABLE_PREFIX."forums", "fid", "fid='$moveto'", array('limit' => 1)); if($db->num_rows($query) == 0) { error($lang->error_invalidforum); }
|
| $plugins->run_hooks("moderation_do_split");
|
// move the selected posts over $query = $db->simple_select(TABLE_PREFIX."posts", "pid", "tid='$tid'");
| // move the selected posts over $query = $db->simple_select(TABLE_PREFIX."posts", "pid", "tid='$tid'");
|
Zeile 801 | Zeile 814 |
---|
add_breadcrumb($lang->nav_multi_deletethreads); if(is_moderator($fid, "candeleteposts") != "yes") {
|
add_breadcrumb($lang->nav_multi_deletethreads); if(is_moderator($fid, "candeleteposts") != "yes") {
|
if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
| error_no_permission();
|
} $threads = getids($fid, "forum"); if(count($threads) < 1)
|
} $threads = getids($fid, "forum"); if(count($threads) < 1)
|
{
| {
|
error($lang->error_inline_nothreadsselected); } $inlineids = implode("|", $threads); clearinline($fid, "forum");
|
error($lang->error_inline_nothreadsselected); } $inlineids = implode("|", $threads); clearinline($fid, "forum");
|
| $plugins->run_hooks("moderation_multideletethreads");
|
eval("\$multidelete = \"".$templates->get("moderation_inline_deletethreads")."\";"); output_page($multidelete); break;
| eval("\$multidelete = \"".$templates->get("moderation_inline_deletethreads")."\";"); output_page($multidelete); break;
|
Zeile 821 | Zeile 832 |
---|
case "do_multideletethreads": if(is_moderator($fid, "candeleteposts") != "yes") {
|
case "do_multideletethreads": if(is_moderator($fid, "candeleteposts") != "yes") {
|
if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
| error_no_permission();
|
} $threadlist = explode("|", $mybb->input['threads']); foreach($threadlist as $tid)
| } $threadlist = explode("|", $mybb->input['threads']); foreach($threadlist as $tid)
|
Zeile 833 | Zeile 841 |
---|
$moderation->delete_thread($tid); $tlist[] = $tid; }
|
$moderation->delete_thread($tid); $tlist[] = $tid; }
|
| $plugins->run_hooks("moderation_do_multideletethreads");
|
log_moderator_action($modlogdata, $lang->multi_deleted_threads); clearinline($fid, "forum"); mark_reports($tlist, "threads");
| log_moderator_action($modlogdata, $lang->multi_deleted_threads); clearinline($fid, "forum"); mark_reports($tlist, "threads");
|
Zeile 841 | Zeile 850 |
---|
// 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");
| if(is_moderator($fid, "canopenclosethreads") != "yes") { error_no_permission(); } $threads = getids($fid, "forum");
|
if(count($threads) < 1)
|
if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected);
| { 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 860 | Zeile 869 |
---|
// Close threads - Inline moderation case "multiclosethreads":
|
// Close threads - Inline moderation case "multiclosethreads":
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); } $threads = getids($fid, "forum");
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); } $threads = getids($fid, "forum");
|
if(count($threads) < 1) {
|
if(count($threads) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected);
|
}
|
}
|
$moderation->close_threads($threads);
| $moderation->close_threads($threads); $plugins->run_hooks("moderation_multiclosethreads");
|
log_moderator_action($modlogdata, $lang->multi_closed_threads); clearinline($fid, "forum"); redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsclosed);
| log_moderator_action($modlogdata, $lang->multi_closed_threads); clearinline($fid, "forum"); redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsclosed);
|
Zeile 879 | Zeile 888 |
---|
// Approve threads - Inline moderation case "multiapprovethreads":
|
// Approve threads - Inline moderation case "multiapprovethreads":
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); } $threads = getids($fid, "forum"); if(count($threads) < 1)
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); } $threads = getids($fid, "forum"); if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
$moderation->approve_threads($threads, $fid);
|
{ error($lang->error_inline_nothreadsselected); }
$moderation->approve_threads($threads, $fid);
|
| $plugins->run_hooks("moderation_multiapprovethreads");
|
log_moderator_action($modlogdata, $lang->multi_approved_threads); clearinline($fid, "forum"); $cache->updatestats();
| log_moderator_action($modlogdata, $lang->multi_approved_threads); clearinline($fid, "forum"); $cache->updatestats();
|
Zeile 899 | Zeile 908 |
---|
// Unapprove threads - Inline moderation case "multiunapprovethreads":
|
// Unapprove threads - Inline moderation case "multiunapprovethreads":
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); } $threads = getids($fid, "forum"); if(count($threads) < 1)
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); } $threads = getids($fid, "forum"); if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
$moderation->unapprove_threads($threads, $fid);
|
{ error($lang->error_inline_nothreadsselected); }
$moderation->unapprove_threads($threads, $fid);
|
| $plugins->run_hooks("moderation_multiunapprovethreads");
|
log_moderator_action($modlogdata, $lang->multi_unapproved_threads); clearinline($fid, "forum"); $cache->updatestats();
| log_moderator_action($modlogdata, $lang->multi_unapproved_threads); clearinline($fid, "forum"); $cache->updatestats();
|
Zeile 919 | Zeile 928 |
---|
// Stick threads - Inline moderation case "multistickthreads":
|
// Stick threads - Inline moderation case "multistickthreads":
|
if(is_moderator($fid, "canopenclosethreads") != "yes") { error_no_permission(); } $threads = getids($fid, "forum"); if(count($threads) < 1)
| if(is_moderator($fid, "canopenclosethreads") != "yes") { error_no_permission(); } $threads = getids($fid, "forum"); if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
$moderation->stick_threads($threads);
|
{ error($lang->error_inline_nothreadsselected); }
$moderation->stick_threads($threads);
|
| $plugins->run_hooks("moderation_multistickthreads");
|
log_moderator_action($modlogdata, $lang->multi_stuck_threads); clearinline($fid, "forum"); redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsstuck);
| log_moderator_action($modlogdata, $lang->multi_stuck_threads); clearinline($fid, "forum"); redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsstuck);
|
Zeile 939 | Zeile 948 |
---|
// Unstick threads - Inline moderaton case "multiunstickthreads": if(is_moderator($fid, "canopenclosethreads") != "yes")
|
// Unstick threads - Inline moderaton case "multiunstickthreads": if(is_moderator($fid, "canopenclosethreads") != "yes")
|
{ error_no_permission(); } $threads = getids($fid, "forum"); if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
| { error_no_permission(); } $threads = getids($fid, "forum"); if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
|
$moderation->unstick_threads($threads);
|
$moderation->unstick_threads($threads);
|
| $plugins->run_hooks("moderation_multiunstickthreads");
|
log_moderator_action($modlogdata, $lang->multi_unstuck_threads); clearinline($fid, "forum"); redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsunstuck);
| log_moderator_action($modlogdata, $lang->multi_unstuck_threads); clearinline($fid, "forum"); redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsunstuck);
|
Zeile 960 | Zeile 969 |
---|
add_breadcrumb($lang->nav_multi_movethreads); $threads = getids($fid, "forum"); if(count($threads) < 1)
|
add_breadcrumb($lang->nav_multi_movethreads); $threads = getids($fid, "forum"); if(count($threads) < 1)
|
{
| {
|
error($lang->error_inline_nothreadsselected);
|
error($lang->error_inline_nothreadsselected);
|
}
| }
|
$inlineids = implode("|", $threads); clearinline($fid, "forum");
|
$inlineids = implode("|", $threads); clearinline($fid, "forum");
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
|
$forumselect = build_forum_jump("", '', 1, '', 0, '', "moveto");
|
$forumselect = build_forum_jump("", '', 1, '', 0, '', "moveto");
|
| $plugins->run_hooks("moderation_multimovethreads");
|
eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";"); output_page($movethread); break;
| eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";"); output_page($movethread); break;
|
Zeile 978 | Zeile 990 |
---|
// Actually move the threads in Inline moderation case "do_multimovethreads": if(is_moderator($fid, "canmanagethreads") != "yes")
|
// Actually move the threads in Inline moderation case "do_multimovethreads": if(is_moderator($fid, "canmanagethreads") != "yes")
|
{
| {
|
error_no_permission(); } $moveto = intval($mybb->input['moveto']);
| error_no_permission(); } $moveto = intval($mybb->input['moveto']);
|
Zeile 986 | Zeile 998 |
---|
foreach($threadlist as $tid) { $tids[] = $tid;
|
foreach($threadlist as $tid) { $tids[] = $tid;
|
}
| }
|
if(is_moderator($moveto, "canmanagethreads") != "yes" && is_moderator($fid, "canmovetononmodforum") != "yes") { error_no_permission();
| if(is_moderator($moveto, "canmanagethreads") != "yes" && is_moderator($fid, "canmovetononmodforum") != "yes") { error_no_permission();
|
Zeile 1008 | Zeile 1020 |
---|
}
$moderation->move_threads($tids, $moveto);
|
}
$moderation->move_threads($tids, $moveto);
|
| $plugins->run_hooks("moderation_do_multimovethreads");
|
log_moderator_action($modlogdata, $lang->multi_moved_threads);
|
log_moderator_action($modlogdata, $lang->multi_moved_threads);
|
|
|
redirect("forumdisplay.php?fid=$moveto", $lang->redirect_inline_threadsmoved); break;
// Delete posts - Inline moderation case "multideleteposts": add_breadcrumb($lang->nav_multi_deleteposts);
|
redirect("forumdisplay.php?fid=$moveto", $lang->redirect_inline_threadsmoved); break;
// Delete posts - Inline moderation case "multideleteposts": add_breadcrumb($lang->nav_multi_deleteposts);
|
if(is_moderator($fid, "candeleteposts") != "yes") { error_no_permission();
| if(is_moderator($fid, "candeleteposts") != "yes") { error_no_permission();
|
} $posts = getids($tid, "thread"); if(count($posts) < 1)
| } $posts = getids($tid, "thread"); if(count($posts) < 1)
|
Zeile 1029 | Zeile 1043 |
---|
$inlineids = implode("|", $posts); //clearinline($pid, "post"); clearinline($tid, "thread");
|
$inlineids = implode("|", $posts); //clearinline($pid, "post"); clearinline($tid, "thread");
|
| $plugins->run_hooks("moderation_multideleteposts");
|
eval("\$multidelete = \"".$templates->get("moderation_inline_deleteposts")."\";"); output_page($multidelete); break;
| eval("\$multidelete = \"".$templates->get("moderation_inline_deleteposts")."\";"); output_page($multidelete); break;
|
Zeile 1059 | Zeile 1073 |
---|
} else {
|
} else {
|
update_thread_count($tid);
| |
mark_reports($plist, "posts"); $url = "showthread.php?tid=$tid"; }
|
mark_reports($plist, "posts"); $url = "showthread.php?tid=$tid"; }
|
| $plugins->run_hooks("moderation_do_multideleteposts");
|
$lang->deleted_selective_posts = sprintf($lang->deleted_selective_posts, $deletecount); log_moderator_action($modlogdata, $lang->deleted_selective_posts);
|
$lang->deleted_selective_posts = sprintf($lang->deleted_selective_posts, $deletecount); log_moderator_action($modlogdata, $lang->deleted_selective_posts);
|
update_forum_count($fid);
| |
redirect($url, $lang->redirect_postsdeleted); break;
| redirect($url, $lang->redirect_postsdeleted); break;
|
Zeile 1083 | Zeile 1096 |
---|
} $inlineids = implode("|", $posts); clearinline($tid, "thread");
|
} $inlineids = implode("|", $posts); clearinline($tid, "thread");
|
| $plugins->run_hooks("moderation_multimergeposts");
|
eval("\$multimerge = \"".$templates->get("moderation_inline_mergeposts")."\";"); output_page($multimerge); break;
| eval("\$multimerge = \"".$templates->get("moderation_inline_mergeposts")."\";"); output_page($multimerge); break;
|
Zeile 1102 | Zeile 1115 |
---|
}
$moderation->merge_posts($plist, $tid, $mybb->input['sep']);
|
}
$moderation->merge_posts($plist, $tid, $mybb->input['sep']);
|
| $plugins->run_hooks("moderation_do_multimergeposts");
|
mark_reports($plist, "posts"); log_moderator_action($modlogdata, $lang->merged_selective_posts); redirect("showthread.php?tid=$tid", $lang->redirect_inline_postsmerged);
| mark_reports($plist, "posts"); log_moderator_action($modlogdata, $lang->merged_selective_posts); redirect("showthread.php?tid=$tid", $lang->redirect_inline_postsmerged);
|
Zeile 1148 | Zeile 1161 |
---|
} $inlineids = implode("|", $posts); clearinline($tid, "thread");
|
} $inlineids = implode("|", $posts); clearinline($tid, "thread");
|
| $plugins->run_hooks("moderation_multisplitposts");
|
$forumselect = build_forum_jump("", $fid, 1, '', 0, '', "moveto"); eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";"); output_page($splitposts);
| $forumselect = build_forum_jump("", $fid, 1, '', 0, '', "moveto"); eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";"); output_page($splitposts);
|
Zeile 1181 | Zeile 1195 |
---|
$newsubject = $mybb->input['newsubject'];
$newtid = $moderation->split_posts($plist, $tid, $moveto, $newsubject);
|
$newsubject = $mybb->input['newsubject'];
$newtid = $moderation->split_posts($plist, $tid, $moveto, $newsubject);
|
| $plugins->run_hooks("moderation_do_multisplitposts");
|
$pid_list = implode(', ', $plist); $lang->split_selective_posts = sprintf($lang->split_selective_posts, $pid_list, $newtid); log_moderator_action($modlogdata, $lang->split_selective_posts);
|
$pid_list = implode(', ', $plist); $lang->split_selective_posts = sprintf($lang->split_selective_posts, $pid_list, $newtid); log_moderator_action($modlogdata, $lang->split_selective_posts);
|
|
|
redirect("showthread.php?tid=$newtid", $lang->redirect_threadsplit); break;
// Approve posts - Inline moderation case "multiapproveposts":
|
redirect("showthread.php?tid=$newtid", $lang->redirect_threadsplit); break;
// Approve posts - Inline moderation case "multiapproveposts":
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
|
$posts = getids($tid, "thread"); if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
$posts = getids($tid, "thread"); if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
}
| }
|
$pids = array(); foreach($posts as $pid) { $pids[] = intval($pid); }
|
$pids = array(); foreach($posts as $pid) { $pids[] = intval($pid); }
|
$moderation->approve_posts($pids, $tid, $fid);
| $moderation->approve_posts($pids); $plugins->run_hooks("moderation_do_multiapproveposts");
|
log_moderator_action($modlogdata, $lang->multi_approve_posts);
|
log_moderator_action($modlogdata, $lang->multi_approve_posts);
|
clearinline($tid, "thread");
| clearinline($tid, "thread");
|
redirect("showthread.php?tid=$tid", $lang->redirect_inline_postsapproved); break;
| redirect("showthread.php?tid=$tid", $lang->redirect_inline_postsapproved); break;
|
Zeile 1224 | Zeile 1240 |
---|
if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
}
| }
|
$pids = array(); foreach($posts as $pid) { $pids[] = intval($pid); }
|
$pids = array(); foreach($posts as $pid) { $pids[] = intval($pid); }
|
$moderation->unapprove_posts($pids, $tid, $fid);
| $moderation->unapprove_posts($pids); $plugins->run_hooks("moderation_do_multiunapproveposts");
|
log_moderator_action($modlogdata, $lang->multi_unapprove_posts); clearinline($tid, "thread"); redirect("showthread.php?tid=$tid", $lang->redirect_inline_postsunapproved);
| log_moderator_action($modlogdata, $lang->multi_unapprove_posts); clearinline($tid, "thread"); redirect("showthread.php?tid=$tid", $lang->redirect_inline_postsunapproved);
|
Zeile 1255 | Zeile 1271 |
---|
} if($flist) {
|
} if($flist) {
|
$flist = "AND fid IN (0$flist)";
| $flist = " AND fid IN (0$flist)";
|
} if(!is_array($mybb->input['reports'])) {
| } if(!is_array($mybb->input['reports'])) {
|
Zeile 1272 | Zeile 1288 |
---|
$sqlarray = array( "reportstatus" => 1,
|
$sqlarray = array( "reportstatus" => 1,
|
); $db->update_query(TABLE_PREFIX."reportedposts", $sqlarray, "rid IN ($rids)");
| ); $db->update_query(TABLE_PREFIX."reportedposts", $sqlarray, "rid IN ($rids){$flist}");
|
$cache->updatereportedposts(); redirect("moderation.php?action=reports", $lang->redirect_reportsmarked); break;
| $cache->updatereportedposts(); redirect("moderation.php?action=reports", $lang->redirect_reportsmarked); break;
|
Zeile 1283 | Zeile 1299 |
---|
if(is_moderator() != "yes") { error_no_permission();
|
if(is_moderator() != "yes") { error_no_permission();
|
}
| }
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage']; if($mybb->input['page'] != "last")
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage']; if($mybb->input['page'] != "last")
|
{
| {
|
$page = intval($mybb->input['page']);
|
$page = intval($mybb->input['page']);
|
}
| }
|
$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(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']."'");
|
$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; } $upper = $start+$perpage;
| $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"); if($postcount > $perpage)
|
$multipage = multipage($postcount, $perpage, $page, "moderation.php?action=reports"); if($postcount > $perpage)
|
{
| {
|
eval("\$reportspages = \"".$templates->get("moderation_reports_multipage")."\";"); }
| eval("\$reportspages = \"".$templates->get("moderation_reports_multipage")."\";"); }
|
Zeile 1353 | Zeile 1369 |
---|
LEFT JOIN ".TABLE_PREFIX."users u ON (r.uid=u.uid) LEFT JOIN ".TABLE_PREFIX."users up ON (p.uid=up.uid) WHERE r.reportstatus ='0'
|
LEFT JOIN ".TABLE_PREFIX."users u ON (r.uid=u.uid) LEFT JOIN ".TABLE_PREFIX."users up ON (p.uid=up.uid) WHERE r.reportstatus ='0'
|
ORDER BY r.dateline ASC LIMIT $start, $perpage ");
| ORDER BY r.dateline ASC LIMIT $start, $perpage ");
|
while($report = $db->fetch_array($query)) { $trow = alt_trow(); $reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
|
while($report = $db->fetch_array($query)) { $trow = alt_trow(); $reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
|
| $report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
|
eval("\$reports .= \"".$templates->get("moderation_reports_report")."\";"); } if(!$reports)
|
eval("\$reports .= \"".$templates->get("moderation_reports_report")."\";"); } if(!$reports)
|
{
| {
|
eval("\$reports = \"".$templates->get("moderation_reports_noreports")."\";"); }
| eval("\$reports = \"".$templates->get("moderation_reports_noreports")."\";"); }
|
Zeile 1377 | Zeile 1394 |
---|
if(is_moderator() != "yes") { error_no_permission();
|
if(is_moderator() != "yes") { error_no_permission();
|
}
| }
|
// Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage'];
| // Figure out if we need to display multiple pages. $perpage = $mybb->settings['threadsperpage'];
|
Zeile 1397 | Zeile 1414 |
---|
{ $page = $result / $perpage; }
|
{ $page = $result / $perpage; }
|
else { $page = intval($result / $perpage) + 1; }
| else { $page = intval($result / $perpage) + 1; }
|
} $postcount = intval($warnings)+1; $pages = $postcount / $perpage;
| } $postcount = intval($warnings)+1; $pages = $postcount / $perpage;
|
Zeile 1419 | Zeile 1436 |
---|
if($page) { $start = ($page-1) * $perpage;
|
if($page) { $start = ($page-1) * $perpage;
|
} else {
| } else {
|
$start = 0; $page = 1; }
| $start = 0; $page = 1; }
|
Zeile 1453 | Zeile 1470 |
---|
{ $reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
|
{ $reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
|
| $report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
|
if($report['reportstatus'] == 0) { $trow = "trow_shaded";
| if($report['reportstatus'] == 0) { $trow = "trow_shaded";
|
Zeile 1480 | Zeile 1498 |
---|
$tool = $custommod->tool_info(intval($mybb->input['action'])); if($tool !== false) {
|
$tool = $custommod->tool_info(intval($mybb->input['action'])); if($tool !== false) {
|
| $plugins->run_hooks("moderation_custommod");
|
if($tool['type'] == 't' && $mybb->input['modtype'] == 'inlinethread') { $tids = getids($fid, "forum");
|
if($tool['type'] == 't' && $mybb->input['modtype'] == 'inlinethread') { $tids = getids($fid, "forum");
|
| if(count($tids) < 1) { error($lang->error_inline_nothreadsselected); }
|
$custommod->execute(intval($mybb->input['action']), $tids); $lang->custom_tool = sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool);
| $custommod->execute(intval($mybb->input['action']), $tids); $lang->custom_tool = sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool);
|
Zeile 1511 | Zeile 1534 |
---|
elseif($tool['type'] == 'p' && $mybb->input['modtype'] == 'inlinepost') { $pids = getids($tid, "thread");
|
elseif($tool['type'] == 'p' && $mybb->input['modtype'] == 'inlinepost') { $pids = getids($tid, "thread");
|
| if(count($pids) < 1) { error($lang->error_inline_nopostsselected); }
|
$ret = $custommod->execute(intval($mybb->input['action']), $tid, $pids); $lang->custom_tool = sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool);
| $ret = $custommod->execute(intval($mybb->input['action']), $tid, $pids); $lang->custom_tool = sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool);
|