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 3030 2007-04-26 00:19:47Z 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; }
|
Zeile 98 | Zeile 100 |
---|
// Open or close a thread case "openclosethread": if(is_moderator($fid, "canopenclosethreads") != "yes")
|
// Open or close a thread case "openclosethread": if(is_moderator($fid, "canopenclosethreads") != "yes")
|
{ error_no_permission(); }
| { error_no_permission(); }
|
$plugins->run_hooks("moderation_openclosethread");
if($thread['closed'] == "yes")
| $plugins->run_hooks("moderation_openclosethread");
if($thread['closed'] == "yes")
|
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);
|
}
$lang->mod_process = sprintf($lang->mod_process, $openclose);
log_moderator_action($modlogdata, $lang->mod_process);
redirect("showthread.php?tid=$tid", $redirect); break;
| }
$lang->mod_process = sprintf($lang->mod_process, $openclose);
log_moderator_action($modlogdata, $lang->mod_process);
redirect("showthread.php?tid=$tid", $redirect); break;
|
// Stick or unstick that post to the top bab! case "stick";
|
// Stick or unstick that post to the top bab! case "stick";
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
$plugins->run_hooks("moderation_stick");
if($thread['sticky'] == 1)
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
$plugins->run_hooks("moderation_stick");
if($thread['sticky'] == 1)
|
{ $stuckunstuck = $lang->unstuck; $redirect = $lang->redirect_unstickthread;
| { $stuckunstuck = $lang->unstuck; $redirect = $lang->redirect_unstickthread;
|
Zeile 144 | Zeile 146 |
---|
$stuckunstuck = $lang->stuck; $redirect = $lang->redirect_stickthread; $moderation->stick_threads($tid);
|
$stuckunstuck = $lang->stuck; $redirect = $lang->redirect_stickthread; $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);
|
log_moderator_action($modlogdata, $lang->mod_process);
|
|
|
redirect("showthread.php?tid=$tid", $redirect); break;
|
redirect("showthread.php?tid=$tid", $redirect); break;
|
|
|
// Remove redirects to a specific thread case "removeredirects":
|
// Remove redirects to a specific thread case "removeredirects":
|
if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
$plugins->run_hooks("moderation_removeredirects");
$moderation->remove_redirects($tid);
| if(is_moderator($fid, "canmanagethreads") != "yes") { error_no_permission(); }
$plugins->run_hooks("moderation_removeredirects");
$moderation->remove_redirects($tid);
|
log_moderator_action($modlogdata, $lang->redirects_removed); redirect("showthread.php?tid=$tid", $lang->redirect_redirectsremoved);
| log_moderator_action($modlogdata, $lang->redirects_removed); redirect("showthread.php?tid=$tid", $lang->redirect_redirectsremoved);
|
Zeile 171 | Zeile 173 |
---|
// Delete thread confirmation page case "deletethread": add_breadcrumb($lang->nav_deletethread);
|
// Delete thread confirmation page case "deletethread": add_breadcrumb($lang->nav_deletethread);
|
if(is_moderator($fid, "candeleteposts") != "yes") {
| if(is_moderator($fid, "candeleteposts") != "yes") {
|
if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
|
if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
|
| $thread['subject'] = htmlspecialchars_uni($thread['subject']);
|
$plugins->run_hooks("moderation_deletethread");
eval("\$deletethread = \"".$templates->get("moderation_deletethread")."\";"); output_page($deletethread);
|
$plugins->run_hooks("moderation_deletethread");
eval("\$deletethread = \"".$templates->get("moderation_deletethread")."\";"); output_page($deletethread);
|
break;
| break;
|
// Delete the actual thread here case "do_deletethread":
|
// Delete the actual thread here case "do_deletethread":
|
if(is_moderator($fid, "candeleteposts") != "yes") { if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
| if(is_moderator($fid, "candeleteposts") != "yes") { if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
|
$plugins->run_hooks("moderation_do_deletethread"); // Log the subject of the deleted thread
| $plugins->run_hooks("moderation_do_deletethread"); // Log the subject of the deleted thread
|
Zeile 215 | Zeile 219 |
---|
case "deletepoll": add_breadcrumb($lang->nav_deletepoll);
|
case "deletepoll": add_breadcrumb($lang->nav_deletepoll);
|
if(is_moderator($fid, "candeleteposts") != "yes")
| 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'])
|
{
|
{
|
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);
| error($lang->error_invalidpoll);
|
}
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";");
| }
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";");
|
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")
|
{
| {
|
if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
|
if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
|
}
| }
|
$query = $db->simple_select(TABLE_PREFIX."polls", "*", "tid='$tid'"); $poll = $db->fetch_array($query); if(!$poll['pid']) { error($lang->error_invalidpoll);
|
$query = $db->simple_select(TABLE_PREFIX."polls", "*", "tid='$tid'"); $poll = $db->fetch_array($query); if(!$poll['pid']) { error($lang->error_invalidpoll);
|
}
| }
|
$plugins->run_hooks("moderation_do_deletepoll");
| $plugins->run_hooks("moderation_do_deletepoll");
|
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 444 | Zeile 446 |
---|
$mergepost = $mybb->input['mergepost']; if(count($mergepost) <= 1)
|
$mergepost = $mybb->input['mergepost']; if(count($mergepost) <= 1)
|
{
| {
|
error($lang->error_nomergeposts); }
| error($lang->error_nomergeposts); }
|
Zeile 614 | Zeile 616 |
---|
// 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")."\";"); }
|
Zeile 626 | Zeile 628 |
---|
// 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 801 | Zeile 803 |
---|
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);
| error($lang->error_inline_nothreadsselected); } $inlineids = implode("|", $threads);
|
Zeile 821 | Zeile 820 |
---|
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 1059 | Zeile 1055 |
---|
} else {
|
} else {
|
update_thread_count($tid);
| |
mark_reports($plist, "posts"); $url = "showthread.php?tid=$tid"; } $lang->deleted_selective_posts = sprintf($lang->deleted_selective_posts, $deletecount); log_moderator_action($modlogdata, $lang->deleted_selective_posts);
|
mark_reports($plist, "posts"); $url = "showthread.php?tid=$tid"; } $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 1361 | Zeile 1355 |
---|
$trow = alt_trow(); $reportdate = my_date($mybb->settings['dateformat'], $report['dateline']); $reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
|
$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)
|
Zeile 1453 | Zeile 1448 |
---|
{ $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";
|