Zeile 45 | Zeile 45 |
---|
$post = get_post($pid); if(!$post) {
|
$post = get_post($pid); if(!$post) {
|
error($lang->error_invalidpost);
| error($lang->error_invalidpost, $lang->error);
|
} $tid = $post['tid']; }
| } $tid = $post['tid']; }
|
Zeile 55 | Zeile 55 |
---|
$thread = get_thread($tid); if(!$thread) {
|
$thread = get_thread($tid); if(!$thread) {
|
error($lang->error_invalidthread);
| error($lang->error_invalidthread, $lang->error);
|
} $fid = $thread['fid']; }
| } $fid = $thread['fid']; }
|
Zeile 80 | Zeile 80 |
---|
if(!$pm) {
|
if(!$pm) {
|
error($lang->error_invalidpm);
| error($lang->error_invalidpm, $lang->error);
|
} }
| } }
|
Zeile 198 | Zeile 198 |
---|
} if(count($tids) < 1) {
|
} if(count($tids) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$mybb->input['tids'] = $tids;
| }
$mybb->input['tids'] = $tids;
|
Zeile 249 | Zeile 249 |
---|
{ case "pgsql": case "sqlite":
|
{ case "pgsql": case "sqlite":
|
$query = $db->simple_select("modtools", 'tid, name, groups', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
| $query = $db->simple_select("modtools", 'tid, name, `groups`', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
|
break; default:
|
break; default:
|
$query = $db->simple_select("modtools", 'tid, name, groups', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'");
| $query = $db->simple_select("modtools", 'tid, name, `groups`', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'");
|
} while($tool = $db->fetch_array($query)) {
| } while($tool = $db->fetch_array($query)) {
|
Zeile 532 | Zeile 532 |
---|
"); } }
|
"); } }
|
|
|
while($delayedmod = $db->fetch_array($query)) {
|
while($delayedmod = $db->fetch_array($query)) {
|
$delayedmod['dateline'] = my_date("jS M Y, {$mybb->settings['timeformat']}", $delayedmod['delaydateline']);
| $delayedmod['dateline'] = my_date('normal', $delayedmod['delaydateline'], "", 2);
|
$delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']];
| $delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']];
|
Zeile 559 | Zeile 559 |
---|
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_forum")."\";"); } $delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);
|
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_forum")."\";"); } $delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);
|
|
|
if($delayedmod['type'] == 'move') { $delayedmod['link'] = get_forum_link($delayedmod['inputs']['new_forum']); $delayedmod['name'] = htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_new_forum")."\";");
|
if($delayedmod['type'] == 'move') { $delayedmod['link'] = get_forum_link($delayedmod['inputs']['new_forum']); $delayedmod['name'] = htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_new_forum")."\";");
|
|
|
if($delayedmod['inputs']['method'] == "redirect") { if((int)$delayedmod['inputs']['redirect_expire'] == 0)
| if($delayedmod['inputs']['method'] == "redirect") { if((int)$delayedmod['inputs']['redirect_expire'] == 0)
|
Zeile 576 | Zeile 576 |
---|
{ $redirect_expire_bit = (int)$delayedmod['inputs']['redirect_expire']." {$lang->days}"; }
|
{ $redirect_expire_bit = (int)$delayedmod['inputs']['redirect_expire']." {$lang->days}"; }
|
|
|
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";"); } }
|
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";"); } }
|
else if($delayedmod['type'] == 'merge')
| elseif($delayedmod['type'] == 'merge')
|
{ $delayedmod['subject'] = htmlspecialchars_uni($delayedmod['inputs']['subject']); $delayedmod['threadurl'] = htmlspecialchars_uni($delayedmod['inputs']['threadurl']);
| { $delayedmod['subject'] = htmlspecialchars_uni($delayedmod['inputs']['subject']); $delayedmod['threadurl'] = htmlspecialchars_uni($delayedmod['inputs']['threadurl']);
|
Zeile 594 | Zeile 594 |
---|
{ $cols = 5; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";");
|
{ $cols = 5; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";");
|
}
| }
|
$url = ''; if($mybb->get_input('tid', MyBB::INPUT_INT)) { $lang->threads = $lang->thread; $thread['link'] = get_thread_link($tid);
|
$url = ''; if($mybb->get_input('tid', MyBB::INPUT_INT)) { $lang->threads = $lang->thread; $thread['link'] = get_thread_link($tid);
|
| $delayedmoderation_subject = $mybb->input['delayedmoderation']['subject']; $delayedmoderation_threadurl = $mybb->input['delayedmoderation']['threadurl'];
|
eval("\$threads = \"".$templates->get("moderation_delayedmoderation_thread")."\";"); eval("\$moderation_delayedmoderation_merge = \"".$templates->get("moderation_delayedmoderation_merge")."\";"); }
| eval("\$threads = \"".$templates->get("moderation_delayedmoderation_thread")."\";"); eval("\$moderation_delayedmoderation_merge = \"".$templates->get("moderation_delayedmoderation_merge")."\";"); }
|
Zeile 610 | Zeile 612 |
---|
{ $tids = getids($mybb->get_input('searchid'), 'search'); $url = htmlspecialchars_uni($mybb->get_input('url'));
|
{ $tids = getids($mybb->get_input('searchid'), 'search'); $url = htmlspecialchars_uni($mybb->get_input('url'));
|
}
| }
|
else { $tids = getids($fid, "forum"); } if(count($tids) < 1) {
|
else { $tids = getids($fid, "forum"); } if(count($tids) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$threads = $lang->sprintf($lang->threads_selected, count($tids)); $moderation_delayedmoderation_merge = '';
|
}
$threads = $lang->sprintf($lang->threads_selected, count($tids)); $moderation_delayedmoderation_merge = '';
|
} $mybb->input['redirect_expire'] = $mybb->get_input('redirect_expire');
| } $redirect_expire = $mybb->get_input('redirect_expire');
|
eval("\$moderation_delayedmoderation_move = \"".$templates->get("moderation_delayedmoderation_move")."\";");
// Generate form elements for date form
| eval("\$moderation_delayedmoderation_move = \"".$templates->get("moderation_delayedmoderation_move")."\";");
// Generate form elements for date form
|
Zeile 699 | Zeile 701 |
---|
error_no_permission(); }
|
error_no_permission(); }
|
if($thread['closed'] == 1)
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
if($thread['closed'] == 1)
|
{ $openclose = $lang->opened; $redirect = $lang->redirect_openthread;
| { $openclose = $lang->opened; $redirect = $lang->redirect_openthread;
|
Zeile 710 | Zeile 717 |
---|
$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 = $lang->sprintf($lang->mod_process, $openclose);
|
$lang->mod_process = $lang->sprintf($lang->mod_process, $openclose);
|
log_moderator_action($modlogdata, $lang->mod_process);
moderation_redirect(get_thread_link($thread['tid']), $redirect);
| log_moderator_action($modlogdata, $lang->mod_process);
moderation_redirect(get_thread_link($thread['tid']), $redirect);
|
break;
// Stick or unstick that post to the top bab!
| break;
// Stick or unstick that post to the top bab!
|
Zeile 727 | Zeile 734 |
---|
if(!is_moderator($fid, "canstickunstickthreads")) { error_no_permission();
|
if(!is_moderator($fid, "canstickunstickthreads")) { error_no_permission();
|
}
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
$plugins->run_hooks("moderation_stick");
if($thread['sticky'] == 1)
|
$plugins->run_hooks("moderation_stick");
if($thread['sticky'] == 1)
|
{
| {
|
$stuckunstuck = $lang->unstuck; $redirect = $lang->redirect_unstickthread; $moderation->unstick_threads($tid);
| $stuckunstuck = $lang->unstuck; $redirect = $lang->redirect_unstickthread; $moderation->unstick_threads($tid);
|
Zeile 743 | Zeile 755 |
---|
$redirect = $lang->redirect_stickthread; $moderation->stick_threads($tid); }
|
$redirect = $lang->redirect_stickthread; $moderation->stick_threads($tid); }
|
|
|
$lang->mod_process = $lang->sprintf($lang->mod_process, $stuckunstuck);
log_moderator_action($modlogdata, $lang->mod_process);
| $lang->mod_process = $lang->sprintf($lang->mod_process, $stuckunstuck);
log_moderator_action($modlogdata, $lang->mod_process);
|
Zeile 753 | Zeile 765 |
---|
// Remove redirects to a specific thread case "removeredirects":
|
// Remove redirects to a specific thread case "removeredirects":
|
// Verify incoming POST request
| // Verify incoming POST request
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
}
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
$plugins->run_hooks("moderation_removeredirects");
$moderation->remove_redirects($tid);
|
$plugins->run_hooks("moderation_removeredirects");
$moderation->remove_redirects($tid);
|
|
|
log_moderator_action($modlogdata, $lang->redirects_removed); moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_redirectsremoved); break;
| log_moderator_action($modlogdata, $lang->redirects_removed); moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_redirectsremoved); break;
|
Zeile 796 | Zeile 813 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "candeletethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "candeletethreads"))
|
{ if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
$plugins->run_hooks("moderation_do_deletethread");
| { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
$plugins->run_hooks("moderation_do_deletethread");
|
// Log the subject of the deleted thread $modlogdata['thread_subject'] = $thread['subject'];
| // Log the subject of the deleted thread $modlogdata['thread_subject'] = $thread['subject'];
|
Zeile 828 | Zeile 845 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
}
$plugins->run_hooks("moderation_deletepoll");
| }
$plugins->run_hooks("moderation_deletepoll");
|
$query = $db->simple_select("polls", "pid", "tid='$tid'"); $poll = $db->fetch_array($query); if(!$poll) {
|
$query = $db->simple_select("polls", "pid", "tid='$tid'"); $poll = $db->fetch_array($query); if(!$poll) {
|
error($lang->error_invalidpoll);
| error($lang->error_invalidpoll, $lang->error);
|
}
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";"); output_page($deletepoll);
|
}
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";"); output_page($deletepoll);
|
break;
| 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->get_input('my_post_key'));
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
if(!isset($mybb->input['delete'])) { error($lang->redirect_pollnotdeleted);
| if(!isset($mybb->input['delete'])) { error($lang->redirect_pollnotdeleted);
|
Zeile 859 | Zeile 881 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
}
| }
|
$query = $db->simple_select("polls", "pid", "tid = $tid"); $poll = $db->fetch_array($query); if(!$poll)
|
$query = $db->simple_select("polls", "pid", "tid = $tid"); $poll = $db->fetch_array($query); if(!$poll)
|
{ error($lang->error_invalidpoll); }
| { error($lang->error_invalidpoll, $lang->error); }
|
$plugins->run_hooks("moderation_do_deletepoll");
| $plugins->run_hooks("moderation_do_deletepoll");
|
Zeile 876 | Zeile 898 |
---|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_polldeleted); break;
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_polldeleted); break;
|
|
|
// Approve a thread case "approvethread":
| // Approve a thread case "approvethread":
|
Zeile 887 | Zeile 909 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
$thread = get_thread($tid);
$plugins->run_hooks("moderation_approvethread");
| $thread = get_thread($tid);
$plugins->run_hooks("moderation_approvethread");
|
Zeile 909 | Zeile 937 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
$thread = get_thread($tid);
$plugins->run_hooks("moderation_unapprovethread");
| $thread = get_thread($tid);
$plugins->run_hooks("moderation_unapprovethread");
|
Zeile 919 | Zeile 953 |
---|
$moderation->unapprove_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
|
$moderation->unapprove_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
|
break;
| break;
|
// Restore a thread case "restorethread":
|
// Restore a thread case "restorethread":
|
// Verify incoming POST request
| // Verify incoming POST request
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canrestorethreads"))
| verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canrestorethreads"))
|
Zeile 945 | Zeile 979 |
---|
// Soft delete a thread case "softdeletethread":
|
// Soft delete a thread case "softdeletethread":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "cansoftdeletethreads"))
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "cansoftdeletethreads"))
|
{
| {
|
error_no_permission(); } $thread = get_thread($tid);
| error_no_permission(); } $thread = get_thread($tid);
|
Zeile 968 | Zeile 1002 |
---|
// 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"))
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
if($thread['visible'] == -1)
|
{
|
{
|
error_no_permission();
| error($lang->error_thread_deleted, $lang->error);
|
}
|
}
|
|
|
$plugins->run_hooks("moderation_move");
$forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto");
| $plugins->run_hooks("moderation_move");
$forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto");
|
Zeile 982 | Zeile 1021 |
---|
// Let's get this thing moving! case "do_move":
|
// Let's get this thing moving! case "do_move":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
|
|
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); $method = $mybb->get_input('method');
|
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); $method = $mybb->get_input('method');
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
|
// Check if user has moderator permission to move to destination if(!is_moderator($moveto, "canmanagethreads") && !is_moderator($fid, "canmovetononmodforum"))
|
// Check if user has moderator permission to move to destination if(!is_moderator($moveto, "canmanagethreads") && !is_moderator($fid, "canmovetononmodforum"))
|
{
| {
|
error_no_permission(); }
|
error_no_permission(); }
|
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
$newperms = forum_permissions($moveto); if($newperms['canview'] == 0 && !is_moderator($fid, "canmovetononmodforum")) {
|
$newperms = forum_permissions($moveto); if($newperms['canview'] == 0 && !is_moderator($fid, "canmovetononmodforum")) {
|
error($lang->error_movetononmodforum);
| error($lang->error_movetononmodforum, $lang->error);
|
}
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') {
|
}
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') {
|
error($lang->error_invalidforum);
| error($lang->error_invalidforum, $lang->error);
|
} if($method != "copy" && $thread['fid'] == $moveto)
|
} if($method != "copy" && $thread['fid'] == $moveto)
|
{ error($lang->error_movetosameforum);
| { error($lang->error_movetosameforum, $lang->error);
|
}
$plugins->run_hooks('moderation_do_move');
| }
$plugins->run_hooks('moderation_do_move');
|
Zeile 1035 | Zeile 1081 |
---|
case "move": case "redirect": log_moderator_action($modlogdata, $lang->thread_moved);
|
case "move": case "redirect": log_moderator_action($modlogdata, $lang->thread_moved);
|
break; }
| break; }
|
moderation_redirect(get_thread_link($newtid), $lang->redirect_threadmoved); break;
| moderation_redirect(get_thread_link($newtid), $lang->redirect_threadmoved); break;
|
Zeile 1051 | Zeile 1097 |
---|
// Make sure we are looking at a real thread here. if(!$thread) {
|
// Make sure we are looking at a real thread here. if(!$thread) {
|
error($lang->error_nomember);
| error($lang->error_nomember, $lang->error);
|
}
$plugins->run_hooks('moderation_viewthreadnotes');
| }
$plugins->run_hooks('moderation_viewthreadnotes');
|
Zeile 1090 | Zeile 1136 |
---|
$modactions = ''; while($modaction = $db->fetch_array($query)) {
|
$modactions = ''; while($modaction = $db->fetch_array($query)) {
|
$modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);
| $modaction['dateline'] = my_date('relative', $modaction['dateline']);
|
$modaction['username'] = htmlspecialchars_uni($modaction['username']); $modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']); $modaction['action'] = htmlspecialchars_uni($modaction['action']);
| $modaction['username'] = htmlspecialchars_uni($modaction['username']); $modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']); $modaction['action'] = htmlspecialchars_uni($modaction['action']);
|
Zeile 1121 | Zeile 1167 |
---|
if(!$modactions) { eval("\$modactions = \"".$templates->get("moderation_threadnotes_modaction_error")."\";");
|
if(!$modactions) { eval("\$modactions = \"".$templates->get("moderation_threadnotes_modaction_error")."\";");
|
} }
| } }
|
$actions = array( 'openclosethread' => $lang->open_close_thread, 'deletethread' => $lang->delete_thread,
| $actions = array( 'openclosethread' => $lang->open_close_thread, 'deletethread' => $lang->delete_thread,
|
Zeile 1180 | Zeile 1226 |
---|
$delayedmods = ''; while($delayedmod = $db->fetch_array($query)) {
|
$delayedmods = ''; while($delayedmod = $db->fetch_array($query)) {
|
$delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);
| $delayedmod['dateline'] = my_date('normal', $delayedmod['delaydateline'], "", 2);
|
$delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']];
| $delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']];
|
Zeile 1224 | Zeile 1270 |
---|
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";"); } }
|
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";"); } }
|
else if($delayedmod['type'] == 'merge')
| elseif($delayedmod['type'] == 'merge')
|
{ $delayedmod['subject'] = htmlspecialchars_uni($delayedmod['inputs']['subject']); $delayedmod['threadurl'] = htmlspecialchars_uni($delayedmod['inputs']['threadurl']);
| { $delayedmod['subject'] = htmlspecialchars_uni($delayedmod['inputs']['subject']); $delayedmod['threadurl'] = htmlspecialchars_uni($delayedmod['inputs']['threadurl']);
|
Zeile 1248 | Zeile 1294 |
---|
// Update the thread notes! case "do_threadnotes":
|
// Update the thread notes! case "do_threadnotes":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
if(!is_moderator($fid, "canmanagethreads"))
|
if(!is_moderator($fid, "canmanagethreads"))
|
{ 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( "notes" => $db->escape_string($mybb->get_input('threadnotes')),
| log_moderator_action($modlogdata, $lang->thread_notes_edited); $sqlarray = array( "notes" => $db->escape_string($mybb->get_input('threadnotes')),
|
Zeile 1273 | Zeile 1319 |
---|
if(!is_moderator($fid, "canviewips")) { error_no_permission();
|
if(!is_moderator($fid, "canviewips")) { error_no_permission();
|
}
| }
|
$post['ipaddress'] = my_inet_ntop($db->unescape_binary($post['ipaddress'])); $hostname = @gethostbyaddr($post['ipaddress']); if(!$hostname || $hostname == $post['ipaddress'])
| $post['ipaddress'] = my_inet_ntop($db->unescape_binary($post['ipaddress'])); $hostname = @gethostbyaddr($post['ipaddress']); if(!$hostname || $hostname == $post['ipaddress'])
|
Zeile 1284 | Zeile 1330 |
---|
$post['username'] = htmlspecialchars_uni($post['username']); $username = build_profile_link($post['username'], $post['uid']);
|
$post['username'] = htmlspecialchars_uni($post['username']); $username = build_profile_link($post['username'], $post['uid']);
|
|
|
// Moderator options $modoptions = ""; if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canuseipsearch'] == 1)
|
// Moderator options $modoptions = ""; if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canuseipsearch'] == 1)
|
{
| {
|
$ipaddress = $post['ipaddress'];
|
$ipaddress = $post['ipaddress'];
|
eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";"); }
$plugins->run_hooks('moderation_getip');
if($modal) {
| eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";"); }
$plugins->run_hooks('moderation_getip');
if($modal) {
|
eval("\$getip = \"".$templates->get("moderation_getip_modal", 1, 0)."\";"); echo $getip; exit; } else
|
eval("\$getip = \"".$templates->get("moderation_getip_modal", 1, 0)."\";"); echo $getip; exit; } else
|
{
| {
|
eval("\$getip = \"".$templates->get("moderation_getip")."\";"); output_page($getip); break;
|
eval("\$getip = \"".$templates->get("moderation_getip")."\";"); output_page($getip); break;
|
}
| }
|
// Let's look up the ip address of a PM case "getpmip": if($pmid <= 0) {
|
// Let's look up the ip address of a PM case "getpmip": if($pmid <= 0) {
|
error($lang->error_invalidpm);
| error($lang->error_invalidpm, $lang->error);
|
} add_breadcrumb($lang->nav_pms, "private.php"); $pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject'])); add_breadcrumb($pm['subject'], "private.php?action=read&pmid={$pmid}"); add_breadcrumb($lang->nav_getpmip); if(!$mybb->usergroup['issupermod'])
|
} add_breadcrumb($lang->nav_pms, "private.php"); $pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject'])); add_breadcrumb($pm['subject'], "private.php?action=read&pmid={$pmid}"); add_breadcrumb($lang->nav_getpmip); if(!$mybb->usergroup['issupermod'])
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 1339 | Zeile 1385 |
---|
{ $ipaddress = $pm['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
|
{ $ipaddress = $pm['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
|
}
$plugins->run_hooks('moderation_getpmip');
| }
$plugins->run_hooks('moderation_getpmip');
|
if($modal) {
| if($modal) {
|
Zeile 1354 | Zeile 1400 |
---|
eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";"); output_page($getpmip); break;
|
eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";"); output_page($getpmip); break;
|
}
| }
|
// Merge threads case "merge": add_breadcrumb($lang->nav_merge);
|
// Merge threads case "merge": add_breadcrumb($lang->nav_merge);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
$plugins->run_hooks("moderation_merge");
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
$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;
|
|
|
// Let's get those threads together baby! (Merge threads) case "do_merge":
| // Let's get those threads together baby! (Merge threads) case "do_merge":
|
Zeile 1379 | Zeile 1430 |
---|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
$plugins->run_hooks("moderation_do_merge");
| }
$plugins->run_hooks("moderation_do_merge");
|
Zeile 1429 | Zeile 1485 |
---|
{ $post = get_post($parameters['pid']); $mergetid = (int)$post['tid'];
|
{ $post = get_post($parameters['pid']); $mergetid = (int)$post['tid'];
|
}
| }
|
elseif(!empty($parameters['tid']))
|
elseif(!empty($parameters['tid']))
|
{
| {
|
$mergetid = (int)$parameters['tid'];
|
$mergetid = (int)$parameters['tid'];
|
} else {
| } else {
|
$mergetid = 0; } $mergethread = get_thread($mergetid); if(!$mergethread)
|
$mergetid = 0; } $mergethread = get_thread($mergetid); if(!$mergethread)
|
{ error($lang->error_badmergeurl);
| { error($lang->error_badmergeurl, $lang->error);
|
} if($mergetid == $tid) { // sanity check
|
} if($mergetid == $tid) { // sanity check
|
error($lang->error_mergewithself);
| error($lang->error_mergewithself, $lang->error);
|
} if(!is_moderator($mergethread['fid'], "canmanagethreads")) { error_no_permission(); } if(isset($mybb->input['subject']))
|
} if(!is_moderator($mergethread['fid'], "canmanagethreads")) { error_no_permission(); } if(isset($mybb->input['subject']))
|
{
| {
|
$subject = $mybb->get_input('subject'); } else { $subject = $thread['subject'];
|
$subject = $mybb->get_input('subject'); } else { $subject = $thread['subject'];
|
}
| }
|
$moderation->merge_threads($mergetid, $tid, $subject);
log_moderator_action($modlogdata, $lang->thread_merged);
|
$moderation->merge_threads($mergetid, $tid, $subject);
log_moderator_action($modlogdata, $lang->thread_merged);
|
|
|
moderation_redirect(get_thread_link($tid), $lang->redirect_threadsmerged); break;
| moderation_redirect(get_thread_link($tid), $lang->redirect_threadsmerged); break;
|
Zeile 1474 | Zeile 1530 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
$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'
|
$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'
|
ORDER BY dateline ASC
| ORDER BY dateline ASC, pid ASC
|
");
|
");
|
|
|
$numposts = $db->num_rows($query); if($numposts <= 1) {
|
$numposts = $db->num_rows($query); if($numposts <= 1) {
|
error($lang->error_cantsplitonepost);
| error($lang->error_cantsplitonepost, $lang->error);
|
}
$altbg = "trow1";
| }
$altbg = "trow1";
|
Zeile 1530 | Zeile 1593 |
---|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
$plugins->run_hooks("moderation_do_split");
| }
$plugins->run_hooks("moderation_do_split");
|
Zeile 1537 | Zeile 1605 |
---|
$mybb->input['splitpost'] = $mybb->get_input('splitpost', MyBB::INPUT_ARRAY); if(empty($mybb->input['splitpost'])) {
|
$mybb->input['splitpost'] = $mybb->get_input('splitpost', MyBB::INPUT_ARRAY); if(empty($mybb->input['splitpost'])) {
|
error($lang->error_nosplitposts);
| error($lang->error_nosplitposts, $lang->error);
|
} $query = $db->simple_select("posts", "COUNT(*) AS totalposts", "tid='{$tid}'"); $count = $db->fetch_array($query);
if($count['totalposts'] == 1) {
|
} $query = $db->simple_select("posts", "COUNT(*) AS totalposts", "tid='{$tid}'"); $count = $db->fetch_array($query);
if($count['totalposts'] == 1) {
|
error($lang->error_cantsplitonepost);
| error($lang->error_cantsplitonepost, $lang->error);
|
}
if($count['totalposts'] == count($mybb->input['splitpost'])) {
|
}
if($count['totalposts'] == count($mybb->input['splitpost'])) {
|
error($lang->error_cantsplitall);
| error($lang->error_cantsplitall, $lang->error);
|
}
if(!empty($mybb->input['moveto']))
| }
if(!empty($mybb->input['moveto']))
|
Zeile 1564 | Zeile 1632 |
---|
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') {
|
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') {
|
error($lang->error_invalidforum);
| error($lang->error_invalidforum, $lang->error);
|
}
$pids = array();
| }
$pids = array();
|
Zeile 1596 | Zeile 1664 |
---|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
$plugins->run_hooks("moderation_removesubscriptions");
| }
$plugins->run_hooks("moderation_removesubscriptions");
|
Zeile 1606 | Zeile 1679 |
---|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_removed_subscriptions); break;
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_removed_subscriptions); break;
|
|
|
// 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(!empty($mybb->input['searchid'])) { // From search page
| if(!empty($mybb->input['searchid'])) { // From search page
|
$threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'candeletethreads'))
|
$threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'candeletethreads'))
|
{ error_no_permission(); } } else
| { error_no_permission(); } } else
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'candeletethreads'))
| { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'candeletethreads'))
|
Zeile 1629 | Zeile 1702 |
---|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$inlineids = implode("|", $threads); if($mybb->get_input('inlinetype') == 'search') {
| $inlineids = implode("|", $threads); if($mybb->get_input('inlinetype') == 'search') {
|
Zeile 1649 | Zeile 1722 |
---|
// 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->get_input('my_post_key'));
$threadlist = explode("|", $mybb->get_input('threads')); if(!is_moderator_by_tids($threadlist, "candeletethreads"))
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$threadlist = explode("|", $mybb->get_input('threads')); if(!is_moderator_by_tids($threadlist, "candeletethreads"))
|
{ error_no_permission(); } foreach($threadlist as $tid) {
| { error_no_permission(); } foreach($threadlist as $tid) {
|
$tid = (int)$tid; $moderation->delete_thread($tid); $tlist[] = $tid;
|
$tid = (int)$tid; $moderation->delete_thread($tid); $tlist[] = $tid;
|
}
| }
|
log_moderator_action($modlogdata, $lang->multi_deleted_threads); if($mybb->get_input('inlinetype') == 'search')
|
log_moderator_action($modlogdata, $lang->multi_deleted_threads); if($mybb->get_input('inlinetype') == 'search')
|
{
| {
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else
| } else
|
{ clearinline($fid, 'forum');
|
{ clearinline($fid, 'forum');
|
}
| }
|
mark_reports($tlist, "threads"); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsdeleted); break;
| mark_reports($tlist, "threads"); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsdeleted); break;
|
Zeile 1680 | Zeile 1753 |
---|
// Open threads - Inline moderation case "multiopenthreads":
|
// Open threads - Inline moderation case "multiopenthreads":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->get_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(); } }
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->get_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(); } }
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$moderation->open_threads($threads);
log_moderator_action($modlogdata, $lang->multi_opened_threads);
| $moderation->open_threads($threads);
log_moderator_action($modlogdata, $lang->multi_opened_threads);
|
Zeile 1716 | Zeile 1789 |
---|
else { clearinline($fid, 'forum');
|
else { clearinline($fid, 'forum');
|
}
| }
|
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsopened); break;
// Close threads - Inline moderation case "multiclosethreads":
|
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsopened); break;
// Close threads - Inline moderation case "multiclosethreads":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
|
{
| {
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
| // From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
|
Zeile 1739 | Zeile 1812 |
---|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads'))
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads'))
|
{ error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
$moderation->close_threads($threads);
| { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected, $lang->error); }
$moderation->close_threads($threads);
|
log_moderator_action($modlogdata, $lang->multi_closed_threads); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
log_moderator_action($modlogdata, $lang->multi_closed_threads); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else
| } else
|
{ clearinline($fid, 'forum'); }
| { clearinline($fid, 'forum'); }
|
Zeile 1787 | Zeile 1860 |
---|
} if(count($threads) < 1) {
|
} if(count($threads) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
}
|
}
|
|
|
$moderation->approve_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_approved_threads);
|
$moderation->approve_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_approved_threads);
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else {
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else {
|
clearinline($fid, 'forum'); } $cache->update_stats();
| clearinline($fid, 'forum'); } $cache->update_stats();
|
Zeile 1816 | Zeile 1889 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canapproveunapprovethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canapproveunapprovethreads'))
|
{ error_no_permission(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1829 | Zeile 1902 |
---|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$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->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else {
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else {
|
clearinline($fid, 'forum'); } $cache->update_stats();
| clearinline($fid, 'forum'); } $cache->update_stats();
|
Zeile 1859 | Zeile 1932 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canrestorethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canrestorethreads'))
|
{ error_no_permission(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1872 | Zeile 1945 |
---|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$moderation->restore_threads($threads);
log_moderator_action($modlogdata, $lang->multi_restored_threads);
|
$moderation->restore_threads($threads);
log_moderator_action($modlogdata, $lang->multi_restored_threads);
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else {
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else {
|
clearinline($fid, 'forum'); } $cache->update_stats();
| clearinline($fid, 'forum'); } $cache->update_stats();
|
Zeile 1902 | Zeile 1975 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'cansoftdeletethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'cansoftdeletethreads'))
|
{ error_no_permission(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1915 | Zeile 1988 |
---|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$moderation->soft_delete_threads($threads);
log_moderator_action($modlogdata, $lang->multi_soft_deleted_threads);
|
$moderation->soft_delete_threads($threads);
log_moderator_action($modlogdata, $lang->multi_soft_deleted_threads);
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($fid, 'forum'); }
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($fid, 'forum'); }
|
$cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadssoftdeleted); break;
| $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadssoftdeleted); break;
|
Zeile 1945 | Zeile 2018 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))
|
{ error_no_permission();
| { error_no_permission();
|
} } else
| } } else
|
Zeile 1959 | Zeile 2032 |
---|
} if(count($threads) < 1) {
|
} if(count($threads) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$moderation->stick_threads($threads);
| }
$moderation->stick_threads($threads);
|
Zeile 1974 | Zeile 2047 |
---|
clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsstuck);
|
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 2001 | Zeile 2074 |
---|
} if(count($threads) < 1) {
|
} if(count($threads) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$moderation->unstick_threads($threads);
| }
$moderation->unstick_threads($threads);
|
Zeile 2042 | Zeile 2115 |
---|
if(count($threads) < 1) {
|
if(count($threads) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
} $inlineids = implode("|", $threads); if($mybb->get_input('inlinetype') == 'search')
| } $inlineids = implode("|", $threads); if($mybb->get_input('inlinetype') == 'search')
|
Zeile 2061 | Zeile 2134 |
---|
// 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 incoming POST request
|
verify_post_check($mybb->get_input('my_post_key'));
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);
|
verify_post_check($mybb->get_input('my_post_key'));
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);
|
| $method = $mybb->get_input('method');
|
$threadlist = explode("|", $mybb->get_input('threads')); if(!is_moderator_by_tids($threadlist, 'canmanagethreads')) {
| $threadlist = explode("|", $mybb->get_input('threads')); if(!is_moderator_by_tids($threadlist, 'canmanagethreads')) {
|
Zeile 2079 | Zeile 2154 |
---|
$newperms = forum_permissions($moveto); if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, 'canmovetononmodforum')) {
|
$newperms = forum_permissions($moveto); if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, 'canmovetononmodforum')) {
|
error($lang->error_movetononmodforum);
| error($lang->error_movetononmodforum, $lang->error);
|
}
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') {
|
}
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') {
|
error($lang->error_invalidforum);
| error($lang->error_invalidforum, $lang->error);
|
}
|
}
|
$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); $expire = 0; if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0) { $expire = TIME_NOW + ($mybb->get_input('redirect_expire', MyBB::INPUT_INT) * 86400); }
foreach($tids as $tid) { $moderation->move_thread($tid, $moveto, $method, $expire); }
|
moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved); break;
| moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved); break;
|
Zeile 2098 | Zeile 2182 |
---|
// Delete posts - Inline moderation case "multideleteposts": add_breadcrumb($lang->nav_multi_deleteposts);
|
// Delete posts - Inline moderation case "multideleteposts": add_breadcrumb($lang->nav_multi_deleteposts);
|
if($mybb->get_input('inlinetype') == 'search')
| if($mybb->get_input('inlinetype') == 'search')
|
{ $posts = getids($mybb->get_input('searchid'), 'search'); }
| { $posts = getids($mybb->get_input('searchid'), 'search'); }
|
Zeile 2110 | Zeile 2194 |
---|
if(count($posts) < 1) {
|
if(count($posts) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
} if(!is_moderator_by_pids($posts, "candeleteposts")) {
| } if(!is_moderator_by_pids($posts, "candeleteposts")) {
|
Zeile 2228 | Zeile 2312 |
---|
} // Remove the cookie once its data is retrieved my_unsetcookie($key);
|
} // Remove the cookie once its data is retrieved my_unsetcookie($key);
|
} }
| } }
|
if(empty($posts)) {
|
if(empty($posts)) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
}
if(!is_moderator_by_pids($posts, "canmanagethreads"))
| }
if(!is_moderator_by_pids($posts, "canmanagethreads"))
|
Zeile 2246 | Zeile 2330 |
---|
SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
|
SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
|
WHERE pid IN (".implode($posts, ",").") ORDER BY dateline ASC
| WHERE pid IN (".implode(",", $posts).") ORDER BY dateline ASC, pid ASC
|
"); $altbg = "trow1"; while($post = $db->fetch_array($query))
| "); $altbg = "trow1"; while($post = $db->fetch_array($query))
|
Zeile 2297 | Zeile 2381 |
---|
$mergepost = $mybb->get_input('mergepost', MyBB::INPUT_ARRAY); if(count($mergepost) <= 1) {
|
$mergepost = $mybb->get_input('mergepost', MyBB::INPUT_ARRAY); if(count($mergepost) <= 1) {
|
error($lang->error_nomergeposts);
| error($lang->error_nomergeposts, $lang->error);
|
}
foreach($mergepost as $pid => $yes)
| }
foreach($mergepost as $pid => $yes)
|
Zeile 2320 | Zeile 2404 |
---|
// Split posts - Inline moderation case "multisplitposts": add_breadcrumb($lang->nav_multi_splitposts);
|
// Split posts - Inline moderation case "multisplitposts": add_breadcrumb($lang->nav_multi_splitposts);
|
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); }
if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission(); } $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 FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid "); $threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost); } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
// Make sure that we are not splitting all posts in the thread // The query does not return a row when the count is 0, so find if some threads are missing (i.e. 0 posts after removal) $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) AND q.pid NOT IN ($pidin) GROUP BY p.tid, p.pid "); $pcheck2 = array(); while($tcheck = $db->fetch_array($query)) { if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid']; } } if(count($pcheck2) != count($pcheck)) { // One or more threads do not have posts after splitting error($lang->error_cantsplitall); }
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search')
| if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); }
if(count($posts) < 1) { error($lang->error_inline_nopostsselected, $lang->error); }
if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission(); } $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 FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid "); $threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost, $lang->error); } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
// Make sure that we are not splitting all posts in the thread // The query does not return a row when the count is 0, so find if some threads are missing (i.e. 0 posts after removal) $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) AND q.pid NOT IN ($pidin) GROUP BY p.tid, p.pid "); $pcheck2 = array(); while($tcheck = $db->fetch_array($query)) { if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid']; } } if(count($pcheck2) != count($pcheck)) { // One or more threads do not have posts after splitting error($lang->error_cantsplitall, $lang->error); }
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search')
|
{ clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); }
| { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); }
|
Zeile 2399 | Zeile 2483 |
---|
eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";"); output_page($splitposts);
|
eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";"); output_page($splitposts);
|
break;
// Actually split the posts - Inline moderation case "do_multisplitposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$plist = array(); $postlist = explode("|", $mybb->get_input('posts')); foreach($postlist as $pid) { $pid = (int)$pid; $plist[] = $pid; }
if(!is_moderator_by_pids($plist, "canmanagethreads")) { error_no_permission(); }
// Ensure all posts exist $posts = array(); if(!empty($plist)) { $query = $db->simple_select('posts', 'pid', 'pid IN ('.implode(',', $plist).')'); while($pid = $db->fetch_field($query, 'pid')) { $posts[] = $pid; } }
if(empty($posts))
| break;
// Actually split the posts - Inline moderation case "do_multisplitposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$plist = array(); $postlist = explode("|", $mybb->get_input('posts')); foreach($postlist as $pid) { $pid = (int)$pid; $plist[] = $pid; }
if(!is_moderator_by_pids($plist, "canmanagethreads")) { error_no_permission(); }
// Ensure all posts exist $posts = array(); if(!empty($plist))
|
{
|
{
|
error($lang->error_inline_nopostsselected);
| $query = $db->simple_select('posts', 'pid', 'pid IN ('.implode(',', $plist).')'); while($pid = $db->fetch_field($query, 'pid')) { $posts[] = $pid; }
|
}
|
}
|
$pidin = implode(',', $posts);
| if(empty($posts)) { error($lang->error_inline_nopostsselected, $lang->error); }
$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
| // 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
|
Zeile 2452 | Zeile 2536 |
---|
{ if((int)$tcheck['count'] <= 1) {
|
{ if((int)$tcheck['count'] <= 1) {
|
error($lang->error_cantsplitonepost);
| error($lang->error_cantsplitonepost, $lang->error);
|
} $pcheck[] = $tcheck['tid']; // Save tids for below }
// Make sure that we are not splitting all posts in the thread
|
} $pcheck[] = $tcheck['tid']; // Save tids for below }
// Make sure that we are not splitting all posts in the thread
|
// The query does not return a row when the count is 0, so find if some threads are missing (i.e. 0 posts after removal) $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) AND q.pid NOT IN ($pidin) GROUP BY p.tid, p.pid "); $pcheck2 = array(); while($tcheck = $db->fetch_array($query)) { if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid']; } } if(count($pcheck2) != count($pcheck)) {
| // The query does not return a row when the count is 0, so find if some threads are missing (i.e. 0 posts after removal) $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) AND q.pid NOT IN ($pidin) GROUP BY p.tid, p.pid "); $pcheck2 = array(); while($tcheck = $db->fetch_array($query)) { if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid']; } } if(count($pcheck2) != count($pcheck)) {
|
// One or more threads do not have posts after splitting
|
// One or more threads do not have posts after splitting
|
error($lang->error_cantsplitall);
| error($lang->error_cantsplitall, $lang->error);
|
}
if(isset($mybb->input['moveto']))
| }
if(isset($mybb->input['moveto']))
|
Zeile 2487 | Zeile 2571 |
---|
else { $moveto = $fid;
|
else { $moveto = $fid;
|
}
| }
|
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
{ error($lang->error_invalidforum); }
| { error($lang->error_invalidforum, $lang->error); }
|
$newsubject = $mybb->get_input('newsubject'); $newtid = $moderation->split_posts($posts, $tid, $moveto, $newsubject);
| $newsubject = $mybb->get_input('newsubject'); $newtid = $moderation->split_posts($posts, $tid, $moveto, $newsubject);
|
Zeile 2510 | Zeile 2594 |
---|
add_breadcrumb($lang->nav_multi_moveposts);
if($mybb->get_input('inlinetype') == 'search')
|
add_breadcrumb($lang->nav_multi_moveposts);
if($mybb->get_input('inlinetype') == 'search')
|
{
| {
|
$posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread');
|
$posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread');
|
}
if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
| }
if(count($posts) < 1) { error($lang->error_inline_nopostsselected, $lang->error); }
|
if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission();
| if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission();
|
Zeile 2532 | Zeile 2616 |
---|
// Make sure that we are not moving posts in a thread with one post // Select number of posts in each thread that the moved post is in
|
// Make sure that we are not moving posts in a thread with one post // Select number of posts in each thread that the moved post is in
|
$query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count
| $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count
|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE 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)
|
Zeile 2544 | Zeile 2628 |
---|
{ if((int)$tcheck['count'] <= 1) {
|
{ if((int)$tcheck['count'] <= 1) {
|
error($lang->error_cantsplitonepost);
| error($lang->error_cantsplitonepost, $lang->error);
|
} $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
| } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
|
Zeile 2564 | Zeile 2648 |
---|
if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid'];
|
if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid'];
|
} } if(count($pcheck2) != count($pcheck)) {
| } } if(count($pcheck2) != count($pcheck)) {
|
// One or more threads do not have posts after splitting
|
// One or more threads do not have posts after splitting
|
error($lang->error_cantmoveall);
| error($lang->error_cantmoveall, $lang->error);
|
}
$inlineids = implode("|", $posts);
| }
$inlineids = implode("|", $posts);
|
Zeile 2654 | Zeile 2738 |
---|
$newthread = get_thread($newtid); if(!$newthread) {
|
$newthread = get_thread($newtid); if(!$newthread) {
|
error($lang->error_badmovepostsurl);
| error($lang->error_badmovepostsurl, $lang->error);
|
} if($newtid == $tid) { // sanity check
|
} if($newtid == $tid) { // sanity check
|
error($lang->error_movetoself);
| error($lang->error_movetoself, $lang->error);
|
}
$postlist = explode("|", $mybb->get_input('posts'));
| }
$postlist = explode("|", $mybb->get_input('posts'));
|
Zeile 2687 | Zeile 2771 |
---|
if(empty($posts)) {
|
if(empty($posts)) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
}
$pidin = implode(',', $posts);
| }
$pidin = implode(',', $posts);
|
Zeile 2702 | Zeile 2786 |
---|
GROUP BY p.tid, p.pid "); $threads = $pcheck = array();
|
GROUP BY p.tid, p.pid "); $threads = $pcheck = array();
|
while($tcheck = $db->fetch_array($query)) {
| while($tcheck = $db->fetch_array($query)) {
|
if((int)$tcheck['count'] <= 1) {
|
if((int)$tcheck['count'] <= 1) {
|
error($lang->error_cantsplitonepost);
| error($lang->error_cantsplitonepost, $lang->error);
|
} $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
| } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
|
Zeile 2731 | Zeile 2815 |
---|
if(count($pcheck2) != count($pcheck)) { // One or more threads do not have posts after splitting
|
if(count($pcheck2) != count($pcheck)) { // One or more threads do not have posts after splitting
|
error($lang->error_cantmoveall);
| error($lang->error_cantmoveall, $lang->error);
|
}
$newtid = $moderation->split_posts($posts, $tid, $newthread['fid'], $db->escape_string($newthread['subject']), $newtid);
| }
$newtid = $moderation->split_posts($posts, $tid, $newthread['fid'], $db->escape_string($newthread['subject']), $newtid);
|
Zeile 2739 | Zeile 2823 |
---|
$pid_list = implode(', ', $posts); $lang->move_selective_posts = $lang->sprintf($lang->move_selective_posts, $pid_list, $newtid); log_moderator_action($modlogdata, $lang->move_selective_posts);
|
$pid_list = implode(', ', $posts); $lang->move_selective_posts = $lang->sprintf($lang->move_selective_posts, $pid_list, $newtid); log_moderator_action($modlogdata, $lang->move_selective_posts);
|
|
|
moderation_redirect(get_thread_link($newtid), $lang->redirect_moveposts); break;
|
moderation_redirect(get_thread_link($newtid), $lang->redirect_moveposts); break;
|
|
|
// Approve posts - Inline moderation case "multiapproveposts":
|
// Approve posts - Inline moderation case "multiapproveposts":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') {
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') {
|
$posts = getids($mybb->get_input('searchid'), 'search'); } else
| $posts = getids($mybb->get_input('searchid'), 'search'); } else
|
Zeile 2758 | Zeile 2842 |
---|
$posts = getids($tid, 'thread'); } if(count($posts) < 1)
|
$posts = getids($tid, 'thread'); } if(count($posts) < 1)
|
{ error($lang->error_inline_nopostsselected); }
| { error($lang->error_inline_nopostsselected, $lang->error); }
|
if(!is_moderator_by_pids($posts, "canapproveunapproveposts")) { error_no_permission();
|
if(!is_moderator_by_pids($posts, "canapproveunapproveposts")) { error_no_permission();
|
}
| }
|
$pids = array(); foreach($posts as $pid) { $pids[] = (int)$pid;
|
$pids = array(); foreach($posts as $pid) { $pids[] = (int)$pid;
|
}
| }
|
$moderation->approve_posts($pids);
log_moderator_action($modlogdata, $lang->multi_approve_posts);
|
$moderation->approve_posts($pids);
log_moderator_action($modlogdata, $lang->multi_approve_posts);
|
if($mybb->get_input('inlinetype') == 'search') {
| if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
Zeile 2788 | Zeile 2872 |
---|
break;
// Unapprove posts - Inline moderation
|
break;
// Unapprove posts - Inline moderation
|
case "multiunapproveposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search');
| case "multiunapproveposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search');
|
} else { $posts = getids($tid, 'thread');
|
} else { $posts = getids($tid, 'thread');
|
}
| }
|
if(count($posts) < 1) {
|
if(count($posts) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
} $pids = array();
|
} $pids = array();
|
|
|
if(!is_moderator_by_pids($posts, "canapproveunapproveposts")) { error_no_permission(); } foreach($posts as $pid)
|
if(!is_moderator_by_pids($posts, "canapproveunapproveposts")) { error_no_permission(); } foreach($posts as $pid)
|
{
| {
|
$pids[] = (int)$pid; }
| $pids[] = (int)$pid; }
|
Zeile 2833 | Zeile 2917 |
---|
// Restore posts - Inline moderation case "multirestoreposts":
|
// Restore posts - Inline moderation case "multirestoreposts":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); }
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_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);
| { error($lang->error_inline_nopostsselected, $lang->error);
|
}
if(!is_moderator_by_pids($posts, "canrestoreposts"))
| }
if(!is_moderator_by_pids($posts, "canrestoreposts"))
|
Zeile 2874 | Zeile 2958 |
---|
} moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsrestored); break;
|
} moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsrestored); break;
|
|
|
// Soft delete posts - Inline moderation case "multisoftdeleteposts": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search')
|
// Soft delete posts - Inline moderation case "multisoftdeleteposts": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search')
|
{ $posts = getids($mybb->get_input('searchid'), 'search'); } else {
| { $posts = getids($mybb->get_input('searchid'), 'search'); } else {
|
$posts = getids($tid, 'thread'); }
if(count($posts) < 1) {
|
$posts = getids($tid, 'thread'); }
if(count($posts) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
} $pids = array();
| } $pids = array();
|
Zeile 2927 | Zeile 3011 |
---|
error_no_permission(); }
|
error_no_permission(); }
|
$uid = $mybb->input['uid'];
| $uid = $mybb->get_input('uid', MyBB::INPUT_INT);
|
$user = get_user($uid); if(!$user['uid'] || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid'])) {
| $user = get_user($uid); if(!$user['uid'] || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid'])) {
|
Zeile 2979 | Zeile 3063 |
---|
}
// Add the IP's to the banfilters
|
}
// Add the IP's to the banfilters
|
foreach(array($user['regip'], $user['lastip']) as $ip)
| if($mybb->settings['purgespammerbanip'] == 1)
|
{
|
{
|
$ip = my_inet_ntop($db->unescape_binary($ip)); $query = $db->simple_select("banfilters", "type", "type = 1 AND filter = '".$db->escape_string($ip)."'"); if($db->num_rows($query) == 0)
| foreach(array($user['regip'], $user['lastip']) as $ip)
|
{
|
{
|
$insert = array( "filter" => $db->escape_string($ip), "type" => 1, "dateline" => TIME_NOW ); $db->insert_query("banfilters", $insert);
| $ip = my_inet_ntop($db->unescape_binary($ip)); $query = $db->simple_select("banfilters", "type", "type = 1 AND filter = '".$db->escape_string($ip)."'"); if($db->num_rows($query) == 0) { $insert = array( "filter" => $db->escape_string($ip), "type" => 1, "dateline" => TIME_NOW ); $db->insert_query("banfilters", $insert); }
|
} }
// Clear the profile $userhandler->clear_profile($uid, $mybb->settings['purgespammerbangroup']);
|
} }
// Clear the profile $userhandler->clear_profile($uid, $mybb->settings['purgespammerbangroup']);
|
$cache->update_banned();
| |
$cache->update_bannedips(); $cache->update_awaitingactivation();
| $cache->update_bannedips(); $cache->update_awaitingactivation();
|
Zeile 3026 | Zeile 3112 |
---|
redirect(get_profile_link($uid), $lang->purgespammer_success); } }
|
redirect(get_profile_link($uid), $lang->purgespammer_success); } }
|
else if($mybb->input['action'] == "purgespammer")
| elseif($mybb->input['action'] == "purgespammer")
|
{ $plugins->run_hooks("moderation_purgespammer_show");
| { $plugins->run_hooks("moderation_purgespammer_show");
|
Zeile 3058 | Zeile 3144 |
---|
if(!is_member($tool['groups'])) { error_no_permission();
|
if(!is_member($tool['groups'])) { error_no_permission();
|
| } if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
if(!empty($options['confirmation']) && empty($mybb->input['confirm']))
| }
if(!empty($options['confirmation']) && empty($mybb->input['confirm']))
|
Zeile 3066 | Zeile 3157 |
---|
$lang->confirm_execute_tool_desc = $lang->sprintf($lang->confirm_execute_tool_desc, htmlspecialchars_uni($tool['name']));
|
$lang->confirm_execute_tool_desc = $lang->sprintf($lang->confirm_execute_tool_desc, htmlspecialchars_uni($tool['name']));
|
$modtype = $mybb->get_input('modtype'); $inlinetype = $mybb->get_input('inlinetype'); $searchid = $mybb->get_input('searchid');
| $action = $mybb->get_input('action', MyBB::INPUT_INT); $modtype = htmlspecialchars_uni($mybb->get_input('modtype')); $inlinetype = htmlspecialchars_uni($mybb->get_input('inlinetype')); $searchid = htmlspecialchars_uni($mybb->get_input('searchid'));
|
$url = htmlspecialchars_uni($mybb->get_input('url')); $plugins->run_hooks('moderation_confirmation');
|
$url = htmlspecialchars_uni($mybb->get_input('url')); $plugins->run_hooks('moderation_confirmation');
|
|
|
eval('$page = "'.$templates->get('moderation_confirmation').'";');
|
eval('$page = "'.$templates->get('moderation_confirmation').'";');
|
|
|
output_page($page); exit;
|
output_page($page); exit;
|
}
$tool['name'] = htmlspecialchars_uni($tool['name']);
| }
$tool['name'] = htmlspecialchars_uni($tool['name']);
|
if($tool['type'] == 't' && $mybb->get_input('modtype') == 'inlinethread') {
| if($tool['type'] == 't' && $mybb->get_input('modtype') == 'inlinethread') {
|
Zeile 3092 | Zeile 3184 |
---|
} if(count($tids) < 1) {
|
} if(count($tids) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
} if(!is_moderator_by_tids($tids, "canusecustomtools")) {
| } if(!is_moderator_by_tids($tids, "canusecustomtools")) {
|
Zeile 3101 | Zeile 3193 |
---|
$thread_options = my_unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f")
|
$thread_options = my_unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f")
|
{ error($lang->error_movetocategory); }
| { error($lang->error_movetocategory, $lang->error); }
|
$custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids); $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool); if($mybb->get_input('inlinetype') == 'search')
|
$custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids); $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool); if($mybb->get_input('inlinetype') == 'search')
|
{
| {
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']); $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']); $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
redirect($return_url, $lang->redirect_customtool_search);
| moderation_redirect($return_url, $lang->redirect_customtool_search);
|
} else {
| } else {
|
Zeile 3126 | Zeile 3218 |
---|
elseif($tool['type'] == 't' && $mybb->get_input('modtype') == 'thread') { if(!is_moderator_by_tids($tid, "canusecustomtools"))
|
elseif($tool['type'] == 't' && $mybb->get_input('modtype') == 'thread') { if(!is_moderator_by_tids($tid, "canusecustomtools"))
|
{
| {
|
error_no_permission(); }
$thread_options = my_unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") {
|
error_no_permission(); }
$thread_options = my_unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") {
|
error($lang->error_movetocategory);
| error($lang->error_movetocategory, $lang->error);
|
}
$ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tid);
| }
$ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tid);
|
Zeile 3164 | Zeile 3256 |
---|
if(count($pids) < 1) {
|
if(count($pids) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
} if(!is_moderator_by_pids($pids, "canusecustomtools")) {
| } if(!is_moderator_by_pids($pids, "canusecustomtools")) {
|
Zeile 3174 | Zeile 3266 |
---|
// Get threads which are associated with the posts $tids = array(); $options = array(
|
// Get threads which are associated with the posts $tids = array(); $options = array(
|
'order_by' => 'dateline', 'order_dir' => 'asc'
| 'order_by' => 'dateline, pid',
|
); $query = $db->simple_select("posts", "DISTINCT tid, dateline", "pid IN (".implode(',',$pids).")", $options); while($row = $db->fetch_array($query))
| ); $query = $db->simple_select("posts", "DISTINCT tid, dateline", "pid IN (".implode(',',$pids).")", $options); while($row = $db->fetch_array($query))
|
Zeile 3191 | Zeile 3282 |
---|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']); $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']); $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
redirect($return_url, $lang->redirect_customtool_search);
| moderation_redirect($return_url, $lang->redirect_customtool_search);
|
} else {
| } else {
|
Zeile 3218 | Zeile 3309 |
---|
/** * Some little handy functions for our inline moderation *
|
/** * Some little handy functions for our inline moderation *
|
* @param int $id * @param string $type *
| * @param int $id * @param string $type *
|
* @return array */ function getids($id, $type) { global $mybb;
|
* @return array */ function getids($id, $type) { global $mybb;
|
|
|
$newids = array(); $cookie = "inlinemod_".$type.$id; if(isset($mybb->cookies[$cookie]))
| $newids = array(); $cookie = "inlinemod_".$type.$id; if(isset($mybb->cookies[$cookie]))
|
Zeile 3261 | Zeile 3352 |
---|
* @return array */ function getallids($id, $type)
|
* @return array */ function getallids($id, $type)
|
{ global $db, $mybb;
| { global $db, $mybb;
|
$ids = array();
// Get any removed threads (after our user hit 'all')
| $ids = array();
// Get any removed threads (after our user hit 'all')
|
Zeile 3293 | Zeile 3384 |
---|
$ids[] = $tid; } }
|
$ids[] = $tid; } }
|
else if($type == 'search')
| elseif($type == 'search')
|
{ $query = $db->simple_select("searchlog", "resulttype, posts, threads", "sid='".$db->escape_string($id)."' AND uid='{$mybb->user['uid']}'", 1); $searchlog = $db->fetch_array($query);
| { $query = $db->simple_select("searchlog", "resulttype, posts, threads", "sid='".$db->escape_string($id)."' AND uid='{$mybb->user['uid']}'", 1); $searchlog = $db->fetch_array($query);
|
Zeile 3352 | Zeile 3443 |
---|
* @return bool True if moderator of all; false otherwise */ function is_moderator_by_pids($posts, $permission='')
|
* @return bool True if moderator of all; false otherwise */ function is_moderator_by_pids($posts, $permission='')
|
{
| {
|
global $db, $mybb;
// Speedy determination for supermods/admins and guests
| global $db, $mybb;
// Speedy determination for supermods/admins and guests
|
Zeile 3363 | Zeile 3454 |
---|
elseif(!$mybb->user['uid']) { return false;
|
elseif(!$mybb->user['uid']) { return false;
|
}
| }
|
// Make an array of threads if not an array if(!is_array($posts)) {
| // Make an array of threads if not an array if(!is_array($posts)) {
|
Zeile 3396 | Zeile 3487 |
---|
* @return bool True if moderator of all; false otherwise */ function is_moderator_by_tids($threads, $permission='')
|
* @return bool True if moderator of all; false otherwise */ function is_moderator_by_tids($threads, $permission='')
|
{
| {
|
global $db, $mybb;
// Speedy determination for supermods/admins and guests
| global $db, $mybb;
// Speedy determination for supermods/admins and guests
|
Zeile 3407 | Zeile 3498 |
---|
elseif(!$mybb->user['uid']) { return false;
|
elseif(!$mybb->user['uid']) { return false;
|
}
| }
|
// Make an array of threads if not an array if(!is_array($threads)) {
| // Make an array of threads if not an array if(!is_array($threads)) {
|
Zeile 3424 | Zeile 3515 |
---|
if(!is_moderator($forum['fid'], $permission)) { return false;
|
if(!is_moderator($forum['fid'], $permission)) { return false;
|
}
| }
|
} return true; }
| } return true; }
|
Zeile 3440 | Zeile 3531 |
---|
global $mybb; if(!empty($mybb->input['url'])) {
|
global $mybb; if(!empty($mybb->input['url'])) {
|
redirect(htmlentities($mybb->input['url']), $message, $title);
| $url = htmlentities($mybb->input['url']);
|
}
|
}
|
| if(my_strpos($url, $mybb->settings['bburl'].'/') !== 0) { if(my_strpos($url, '/') === 0) { $url = my_substr($url, 1); } $url_segments = explode('/', $url); $url = $mybb->settings['bburl'].'/'.end($url_segments); }
|
redirect($url, $message, $title); }
| redirect($url, $message, $title); }
|