Zeile 11 | Zeile 11 |
---|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'moderation.php');
|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'moderation.php');
|
$templatelist = "changeuserbox,loginbox,moderation_delayedmoderation_custommodtool,moderation_delayedmodaction_notes,moderation_delayedmoderation_merge,moderation_delayedmoderation_move"; $templatelist .= ",moderation_delayedmoderation,moderation_deletethread,moderation_deletepoll,moderation_mergeposts_post,moderation_viewthreadnotes,moderation_confirmation,moderation_purgespammer"; $templatelist .= ",moderation_move,moderation_threadnotes_modaction,moderation_threadnotes_delayedmodaction,moderation_threadnotes,moderation_getip_modoptions,moderation_getip,moderation_getpmip";
| $templatelist = "changeuserbox,loginbox,moderation_delayedmoderation_custommodtool,moderation_delayedmodaction_notes,moderation_delayedmoderation_merge,moderation_delayedmoderation_move,moderation_threadnotes"; $templatelist .= ",moderation_delayedmoderation,moderation_deletethread,moderation_deletepoll,moderation_mergeposts_post,moderation_viewthreadnotes,moderation_confirmation,moderation_purgespammer,forumjump_bit"; $templatelist .= ",moderation_move,moderation_threadnotes_modaction,moderation_threadnotes_delayedmodaction,moderation_getip_modoptions,moderation_getip,moderation_getpmip,moderation_getpmip_modal";
|
$templatelist .= ",moderation_split_post,moderation_inline_deletethreads,moderation_inline_movethreads,moderation_inline_deleteposts,moderation_inline_mergeposts,moderation_threadnotes_modaction_error"; $templatelist .= ",moderation_inline_splitposts,forumjump_special,forumjump_advanced,forumdisplay_password_wrongpass,forumdisplay_password,moderation_inline_moveposts,moderation_delayedmodaction_error"; $templatelist .= ",moderation_delayedmodaction_notes_thread_single,moderation_delayedmodaction_notes_thread_multiple,moderation_delayedmodaction_notes_forum,moderation_delayedmodaction_notes_new_forum";
|
$templatelist .= ",moderation_split_post,moderation_inline_deletethreads,moderation_inline_movethreads,moderation_inline_deleteposts,moderation_inline_mergeposts,moderation_threadnotes_modaction_error"; $templatelist .= ",moderation_inline_splitposts,forumjump_special,forumjump_advanced,forumdisplay_password_wrongpass,forumdisplay_password,moderation_inline_moveposts,moderation_delayedmodaction_error"; $templatelist .= ",moderation_delayedmodaction_notes_thread_single,moderation_delayedmodaction_notes_thread_multiple,moderation_delayedmodaction_notes_forum,moderation_delayedmodaction_notes_new_forum";
|
$templatelist .= ",moderation_delayedmodaction_notes_redirect,moderation_delayedmodaction_notes_merge,moderation_delayedmoderation_thread,moderation_threadnotes_modaction_thread,forumjump_bit";
| $templatelist .= ",moderation_delayedmodaction_notes_redirect,moderation_delayedmodaction_notes_merge,moderation_delayedmoderation_thread,moderation_threadnotes_modaction_thread,moderation_getip_modal";
|
$templatelist .= ",moderation_delayedmoderation_date_day,moderation_delayedmoderation_date_month,moderation_threadnotes_modaction_post,moderation_merge,moderation_split,moderation_threadnotes_modaction_forum";
|
$templatelist .= ",moderation_delayedmoderation_date_day,moderation_delayedmoderation_date_month,moderation_threadnotes_modaction_post,moderation_merge,moderation_split,moderation_threadnotes_modaction_forum";
|
| $templatelist .= ",moderation_delayedmoderation_openclose,moderation_delayedmoderation_softdeleterestore,moderation_delayedmoderation_delete,moderation_delayedmoderation_stick,moderation_delayedmoderation_approve";
|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
| require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
|
Zeile 37 | Zeile 38 |
---|
$pid = $mybb->get_input('pid', MyBB::INPUT_INT); $fid = $mybb->get_input('fid', MyBB::INPUT_INT); $pmid = $mybb->get_input('pmid', MyBB::INPUT_INT);
|
$pid = $mybb->get_input('pid', MyBB::INPUT_INT); $fid = $mybb->get_input('fid', MyBB::INPUT_INT); $pmid = $mybb->get_input('pmid', MyBB::INPUT_INT);
|
| $modal = $mybb->get_input('modal', MyBB::INPUT_INT);
|
if($pid) {
| if($pid) {
|
Zeile 106 | Zeile 108 |
---|
{ // Check if this forum is password protected and we have a valid password check_forum_password($forum['fid']);
|
{ // Check if this forum is password protected and we have a valid password check_forum_password($forum['fid']);
|
| }
$log_multithreads_actions = array("do_multideletethreads", "multiclosethreads", "multiopenthreads", "multiapprovethreads", "multiunapprovethreads", "multirestorethreads", "multisoftdeletethreads","multistickthreads", "multiunstickthreads", "do_multimovethreads"); if(in_array($mybb->input['action'], $log_multithreads_actions)) { if(!empty($mybb->input['searchid'])) { $tids = getids($mybb->get_input('searchid'), 'search'); } else { $tids = getids($fid, 'forum'); }
$modlogdata['tids'] = (array)$tids;
unset($tids);
|
}
$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']); eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");
|
}
$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']); eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");
|
$allowable_moderation_actions = array("getip", "getpmip", "cancel_delayedmoderation", "delayedmoderation", "threadnotes", "purgespammer", "viewthreadnotes");
| $allowable_moderation_actions = array("getip", "getpmip", "cancel_delayedmoderation", "delayedmoderation", "threadnotes", "purgespammer", "viewthreadnotes");
|
if($mybb->request_method != "post" && !in_array($mybb->input['action'], $allowable_moderation_actions))
|
if($mybb->request_method != "post" && !in_array($mybb->input['action'], $allowable_moderation_actions))
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 123 | Zeile 142 |
---|
{ // Delayed Moderation case "cancel_delayedmoderation":
|
{ // Delayed Moderation case "cancel_delayedmoderation":
|
// 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'));
|
add_breadcrumb($lang->delayed_moderation); if(!is_moderator($fid, "canmanagethreads"))
|
add_breadcrumb($lang->delayed_moderation); if(!is_moderator($fid, "canmanagethreads"))
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
$plugins->run_hooks('moderation_cancel_delayedmoderation');
| }
$plugins->run_hooks('moderation_cancel_delayedmoderation');
|
$db->delete_query("delayedmoderation", "did='".$mybb->get_input('did', MyBB::INPUT_INT)."'");
if($tid == 0) {
|
$db->delete_query("delayedmoderation", "did='".$mybb->get_input('did', MyBB::INPUT_INT)."'");
if($tid == 0) {
|
moderation_redirect(get_forum_link($fid), $lang->redirect_delayed_moderation_cancelled); } else {
| moderation_redirect(get_forum_link($fid), $lang->redirect_delayed_moderation_cancelled); } else {
|
moderation_redirect("moderation.php?action=delayedmoderation&tid={$tid}&my_post_key={$mybb->post_code}", $lang->redirect_delayed_moderation_cancelled); } break;
| moderation_redirect("moderation.php?action=delayedmoderation&tid={$tid}&my_post_key={$mybb->post_code}", $lang->redirect_delayed_moderation_cancelled); } break;
|
Zeile 195 | Zeile 214 |
---|
$errors = array(); $customthreadtools = "";
|
$errors = array(); $customthreadtools = "";
|
$allowed_types = array('openclosethread', 'softdeleterestorethread', 'deletethread', 'move', 'stick', 'merge', 'removeredirects', 'removesubscriptions', 'approveunapprovethread');
| $allowed_types = array('move', 'merge', 'removeredirects', 'removesubscriptions');
|
|
|
$mybb->input['type'] = $mybb->get_input('type');
switch($db->type)
| if(is_moderator($fid, "canopenclosethreads"))
|
{
|
{
|
case "pgsql": case "sqlite": $query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'"); break; default: $query = $db->simple_select("modtools", 'tid, name', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'"); } while($tool = $db->fetch_array($query))
| $allowed_types[] = "openclosethread"; }
if(is_moderator($fid, "cansoftdeletethreads") || is_moderator($fid, "canrestorethreads")) { $allowed_types[] = "softdeleterestorethread"; }
if(is_moderator($fid, "candeletethreads")) { $allowed_types[] = "deletethread"; }
if(is_moderator($fid, "canstickunstickthreads")) { $allowed_types[] = "stick"; }
if(is_moderator($fid, "canapproveunapprovethreads")) { $allowed_types[] = "approveunapprovethread"; }
$mybb->input['type'] = $mybb->get_input('type');
if(is_moderator($fid, "canusecustomtools"))
|
{
|
{
|
$allowed_types[] = "modtool_".$tool['tid'];
$tool['name'] = htmlspecialchars_uni($tool['name']);
$checked = ""; if($mybb->input['type'] == "modtool_".$tool['tid'])
| switch($db->type) { case "pgsql": case "sqlite": $query = $db->simple_select("modtools", 'tid, name, groups', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'"); break; default: $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))
|
{
|
{
|
$checked = "checked=\"checked\""; }
| if(is_member($tool['groups'])) { $allowed_types[] = "modtool_".$tool['tid'];
$tool['name'] = htmlspecialchars_uni($tool['name']);
$checked = ""; if($mybb->input['type'] == "modtool_".$tool['tid']) { $checked = "checked=\"checked\""; }
|
|
|
eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";");
| eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";"); } }
|
}
$mybb->input['delayedmoderation'] = $mybb->get_input('delayedmoderation', MyBB::INPUT_ARRAY);
| }
$mybb->input['delayedmoderation'] = $mybb->get_input('delayedmoderation', MyBB::INPUT_ARRAY);
|
Zeile 241 | Zeile 291 |
---|
if($mybb->input['type'] == 'move') {
|
if($mybb->input['type'] == 'move') {
|
$newforum = get_forum($fid);
| $newfid = (int)$mybb->input['delayedmoderation']['new_forum'];
// Make sure moderator has permission to move to the new forum $newperms = forum_permissions($newfid); if($newperms['canview'] == 0 || !is_moderator($newfid, 'canmovetononmodforum')) { $errors[] = $lang->error_movetononmodforum; }
$newforum = get_forum($newfid);
|
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
{
| {
|
$errors[] = $lang->error_invalidforum;
|
$errors[] = $lang->error_invalidforum;
|
| }
$method = $mybb->input['delayedmoderation']['method']; if($method != "copy" && $fid == $newfid) { $errors[] = $lang->error_movetosameforum;
|
} }
| } }
|
Zeile 281 | Zeile 346 |
---|
{ if(is_array($mybb->input['tids'])) {
|
{ if(is_array($mybb->input['tids'])) {
|
$mybb->input['tids'] = implode(',' , $mybb->input['tids']);
| $mybb->input['tids'] = implode(',', $mybb->input['tids']);
|
}
$did = $db->insert_query("delayedmoderation", array(
| }
$did = $db->insert_query("delayedmoderation", array(
|
Zeile 536 | Zeile 601 |
---|
{ $lang->threads = $lang->thread; $thread['link'] = get_thread_link($tid);
|
{ $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 558 | Zeile 625 |
---|
$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 588 | Zeile 655 |
---|
$dateyear = gmdate('Y', TIME_NOW + $localized_time_offset); $datetime = gmdate($mybb->settings['timeformat'], TIME_NOW + $localized_time_offset);
|
$dateyear = gmdate('Y', TIME_NOW + $localized_time_offset); $datetime = gmdate($mybb->settings['timeformat'], TIME_NOW + $localized_time_offset);
|
| $openclosethread = ''; if(is_moderator($fid, "canopenclosethreads")) { eval('$openclosethread = "'.$templates->get('moderation_delayedmoderation_openclose').'";'); }
$softdeleterestorethread = ''; if(is_moderator($fid, "cansoftdeletethreads") || is_moderator($fid, "canrestorethreads")) { eval('$softdeleterestorethread = "'.$templates->get('moderation_delayedmoderation_softdeleterestore').'";'); }
$deletethread = ''; if(is_moderator($fid, "candeletethreads")) { eval('$deletethread = "'.$templates->get('moderation_delayedmoderation_delete').'";'); }
$stickunstickthread = ''; if(is_moderator($fid, "canstickunstickthreads")) { eval('$stickunstickthread = "'.$templates->get('moderation_delayedmoderation_stick').'";'); }
$approveunapprovethread = ''; if(is_moderator($fid, "canapproveunapprovethreads")) { eval('$approveunapprovethread = "'.$templates->get('moderation_delayedmoderation_approve').'";'); }
|
$plugins->run_hooks("moderation_delayedmoderation");
| $plugins->run_hooks("moderation_delayedmoderation");
|
Zeile 600 | Zeile 697 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canopenclosethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canopenclosethreads"))
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 615 | Zeile 712 |
---|
$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);
|
Zeile 630 | Zeile 727 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canstickunstickthreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canstickunstickthreads"))
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
| }
|
$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 647 | Zeile 744 |
---|
$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 = $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);
|
|
|
moderation_redirect(get_thread_link($thread['tid']), $redirect); break;
| moderation_redirect(get_thread_link($thread['tid']), $redirect); break;
|
Zeile 670 | Zeile 767 |
---|
$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;
// Delete thread confirmation page case "deletethread":
|
log_moderator_action($modlogdata, $lang->redirects_removed); moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_redirectsremoved); break;
// Delete thread confirmation page case "deletethread":
|
|
|
add_breadcrumb($lang->nav_deletethread);
|
add_breadcrumb($lang->nav_deletethread);
|
if(!is_moderator($fid, "candeletethreads")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
$plugins->run_hooks("moderation_deletethread");
eval("\$deletethread = \"".$templates->get("moderation_deletethread")."\";"); output_page($deletethread); break;
// Delete the actual thread here case "do_deletethread":
// Verify incoming POST request 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_deletethread");
eval("\$deletethread = \"".$templates->get("moderation_deletethread")."\";"); output_page($deletethread); break;
// Delete the actual thread here case "do_deletethread":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
if(!is_moderator($fid, "candeletethreads")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
| if(!is_moderator($fid, "candeletethreads")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
|
Zeile 824 | Zeile 921 |
---|
$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":
|
Zeile 906 | Zeile 1003 |
---|
$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_no_permission();
| error($lang->error_movetononmodforum);
|
}
$newforum = get_forum($moveto);
| }
$newforum = get_forum($moveto);
|
Zeile 1176 | Zeile 1273 |
---|
case "getip": add_breadcrumb($lang->nav_getip); if(!is_moderator($fid, "canviewips"))
|
case "getip": add_breadcrumb($lang->nav_getip); if(!is_moderator($fid, "canviewips"))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
$post['ipaddress'] = my_inet_ntop($db->unescape_binary($post['ipaddress'])); $hostname = @gethostbyaddr($post['ipaddress']); if(!$hostname || $hostname == $post['ipaddress']) { $hostname = $lang->resolve_fail;
|
$post['ipaddress'] = my_inet_ntop($db->unescape_binary($post['ipaddress'])); $hostname = @gethostbyaddr($post['ipaddress']); if(!$hostname || $hostname == $post['ipaddress']) { $hostname = $lang->resolve_fail;
|
}
| }
|
$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']);
|
Zeile 1193 | Zeile 1290 |
---|
// 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']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";"); }
$plugins->run_hooks('moderation_getip');
|
$ipaddress = $post['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";"); }
$plugins->run_hooks('moderation_getip');
|
eval("\$getip = \"".$templates->get("moderation_getip")."\";"); output_page($getip); break;
| if($modal) { eval("\$getip = \"".$templates->get("moderation_getip_modal", 1, 0)."\";"); echo $getip; exit; } else { eval("\$getip = \"".$templates->get("moderation_getip")."\";"); output_page($getip); break; }
|
// Let's look up the ip address of a PM case "getpmip":
| // Let's look up the ip address of a PM case "getpmip":
|
Zeile 1239 | Zeile 1345 |
---|
$plugins->run_hooks('moderation_getpmip');
|
$plugins->run_hooks('moderation_getpmip');
|
eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";"); output_page($getpmip); break;
| if($modal) { eval("\$getpmip = \"".$templates->get("moderation_getpmip_modal", 1, 0)."\";"); echo $getpmip; exit; } else { eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";"); output_page($getpmip); break; }
|
// Merge threads case "merge":
| // Merge threads case "merge":
|
Zeile 1316 | Zeile 1431 |
---|
{ $post = get_post($parameters['pid']); $mergetid = (int)$post['tid'];
|
{ $post = get_post($parameters['pid']); $mergetid = (int)$post['tid'];
|
}
| }
|
elseif(!empty($parameters['tid'])) { $mergetid = (int)$parameters['tid'];
|
elseif(!empty($parameters['tid'])) { $mergetid = (int)$parameters['tid'];
|
} else
| } else
|
{ $mergetid = 0; }
| { $mergetid = 0; }
|
Zeile 1336 | Zeile 1451 |
---|
} if(!is_moderator($mergethread['fid'], "canmanagethreads")) {
|
} if(!is_moderator($mergethread['fid'], "canmanagethreads")) {
|
error_no_permission(); } if(isset($mybb->input['subject'])) { $subject = $mybb->get_input('subject');
| error_no_permission(); } if(isset($mybb->input['subject'])) { $subject = $mybb->get_input('subject');
|
} else { $subject = $thread['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);
|
Zeile 1357 | Zeile 1472 |
---|
// Divorce the posts in this thread (Split!) case "split": add_breadcrumb($lang->nav_split);
|
// Divorce the posts in this thread (Split!) case "split": add_breadcrumb($lang->nav_split);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
|
$query = $db->query(" SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p
| $query = $db->query(" SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p
|
Zeile 1372 | Zeile 1487 |
---|
if($numposts <= 1) { error($lang->error_cantsplitonepost);
|
if($numposts <= 1) { error($lang->error_cantsplitonepost);
|
}
| }
|
$altbg = "trow1"; $posts = '';
| $altbg = "trow1"; $posts = '';
|
Zeile 1398 | Zeile 1513 |
---|
eval("\$posts .= \"".$templates->get("moderation_split_post")."\";"); $altbg = alt_trow(); }
|
eval("\$posts .= \"".$templates->get("moderation_split_post")."\";"); $altbg = alt_trow(); }
|
| clearinline($tid, 'thread');
|
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
$plugins->run_hooks("moderation_split");
eval("\$split = \"".$templates->get("moderation_split")."\";"); output_page($split);
|
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
$plugins->run_hooks("moderation_split");
eval("\$split = \"".$templates->get("moderation_split")."\";"); output_page($split);
|
break;
| break;
|
// Let's break them up buddy! (Do the split) case "do_split":
| // Let's break them up buddy! (Do the split) case "do_split":
|
Zeile 1474 | Zeile 1591 |
---|
// Delete Thread Subscriptions case "removesubscriptions":
|
// Delete Thread Subscriptions case "removesubscriptions":
|
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
|
|
|
$plugins->run_hooks("moderation_removesubscriptions");
$moderation->remove_thread_subscriptions($tid, true);
| $plugins->run_hooks("moderation_removesubscriptions");
$moderation->remove_thread_subscriptions($tid, true);
|
Zeile 1493 | Zeile 1614 |
---|
add_breadcrumb($lang->nav_multi_deletethreads);
if(!empty($mybb->input['searchid']))
|
add_breadcrumb($lang->nav_multi_deletethreads);
if(!empty($mybb->input['searchid']))
|
{
| {
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'candeletethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'candeletethreads'))
|
{ error_no_permission();
| { error_no_permission();
|
} } else
| } } else
|
Zeile 1530 | Zeile 1651 |
---|
// 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();
| { error_no_permission();
|
} foreach($threadlist as $tid)
|
} foreach($threadlist as $tid)
|
{
| {
|
$tid = (int)$tid; $moderation->delete_thread($tid); $tlist[] = $tid;
| $tid = (int)$tid; $moderation->delete_thread($tid); $tlist[] = $tid;
|
Zeile 1549 | Zeile 1670 |
---|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
clearinline($fid, 'forum'); } mark_reports($tlist, "threads"); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsdeleted); break;
|
clearinline($fid, 'forum'); } mark_reports($tlist, "threads"); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsdeleted); break;
|
|
|
// 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(); }
| // 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);
|
}
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
}
| }
|
$moderation->open_threads($threads);
| $moderation->open_threads($threads);
|
Zeile 1620 | Zeile 1741 |
---|
{ $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); }
| { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
|
$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');
|
$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');
|
} else {
| } else {
|
clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsclosed); break;
// Approve threads - Inline moderation
|
clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsclosed); break;
// Approve threads - Inline moderation
|
case "multiapprovethreads":
// 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, 'canapproveunapprovethreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads')) { error_no_permission(); } } if(count($threads) < 1) {
| case "multiapprovethreads":
// 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, 'canapproveunapprovethreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads')) { error_no_permission(); } } if(count($threads) < 1) {
|
error($lang->error_inline_nothreadsselected); }
| error($lang->error_inline_nothreadsselected); }
|
Zeile 1677 | Zeile 1798 |
---|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else
| } else
|
{ clearinline($fid, 'forum'); }
| { clearinline($fid, 'forum'); }
|
Zeile 1705 | Zeile 1826 |
---|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads'))
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads'))
|
{ error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
| { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
}
|
}
|
|
|
$moderation->unapprove_threads($threads, $fid);
|
$moderation->unapprove_threads($threads, $fid);
|
|
|
log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
|
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'); }
| { clearinline($fid, 'forum'); }
|
Zeile 1731 | Zeile 1852 |
---|
// Restore threads - Inline moderation case "multirestorethreads":
|
// Restore threads - Inline moderation case "multirestorethreads":
|
|
|
// 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'));
|
Zeile 1744 | Zeile 1865 |
---|
error_no_permission(); } }
|
error_no_permission(); } }
|
else
| else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canrestorethreads')) { error_no_permission(); } } if(count($threads) < 1)
|
{
|
{
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canrestorethreads')) { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
$moderation->restore_threads($threads);
| error($lang->error_inline_nothreadsselected); }
$moderation->restore_threads($threads);
|
log_moderator_action($modlogdata, $lang->multi_restored_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'); }
| { clearinline($fid, 'forum'); }
|
Zeile 1773 | Zeile 1894 |
---|
break;
// Soft delete threads - Inline moderation
|
break;
// Soft delete threads - Inline moderation
|
case "multisoftdeletethreads":
| case "multisoftdeletethreads":
|
// 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'));
|
Zeile 1787 | Zeile 1908 |
---|
error_no_permission(); } }
|
error_no_permission(); } }
|
else
| else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'cansoftdeletethreads')) { error_no_permission(); } } if(count($threads) < 1)
|
{
|
{
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'cansoftdeletethreads'))
| error($lang->error_inline_nothreadsselected); }
$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'); } $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadssoftdeleted); break;
// Stick threads - Inline moderation case "multistickthreads":
// 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, 'canstickunstickthreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads'))
|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
}
| }
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
|
$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'); } $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadssoftdeleted); break;
// Stick threads - Inline moderation case "multistickthreads":
// 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, 'canstickunstickthreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads')) { error_no_permission(); } } if(count($threads) < 1)
| $moderation->stick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_stuck_threads); if($mybb->get_input('inlinetype') == 'search')
|
{
|
{
|
error($lang->error_inline_nothreadsselected); }
$moderation->stick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_stuck_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 {
|
Zeile 1868 | Zeile 1989 |
---|
// 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 { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1888 | Zeile 2009 |
---|
$moderation->unstick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_unstuck_threads);
|
$moderation->unstick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_unstuck_threads);
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); }
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); }
|
else { clearinline($fid, 'forum');
| else { clearinline($fid, 'forum');
|
Zeile 1904 | Zeile 2025 |
---|
add_breadcrumb($lang->nav_multi_movethreads);
if(!empty($mybb->input['searchid']))
|
add_breadcrumb($lang->nav_multi_movethreads);
if(!empty($mybb->input['searchid']))
|
{
| {
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads'))
|
{
| {
|
error_no_permission(); } } else
|
error_no_permission(); } } else
|
{
| {
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads')) {
| $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads')) {
|
Zeile 1926 | Zeile 2047 |
---|
error($lang->error_inline_nothreadsselected); } $inlineids = implode("|", $threads);
|
error($lang->error_inline_nothreadsselected); } $inlineids = implode("|", $threads);
|
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
|
{
| {
|
clearinline($fid, 'forum'); } $forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto");
| clearinline($fid, 'forum'); } $forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto");
|
Zeile 1939 | Zeile 2060 |
---|
eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";"); output_page($movethread); break;
|
eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";"); output_page($movethread); break;
|
|
|
// Actually move the threads in Inline moderation case "do_multimovethreads":
| // Actually move the threads in Inline moderation case "do_multimovethreads":
|
Zeile 1949 | Zeile 2070 |
---|
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); $threadlist = explode("|", $mybb->get_input('threads')); if(!is_moderator_by_tids($threadlist, 'canmanagethreads'))
|
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); $threadlist = explode("|", $mybb->get_input('threads')); if(!is_moderator_by_tids($threadlist, 'canmanagethreads'))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
foreach($threadlist as $tid) { $tids[] = (int)$tid;
| foreach($threadlist as $tid) { $tids[] = (int)$tid;
|
Zeile 1960 | Zeile 2081 |
---|
$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_no_permission();
| error($lang->error_movetononmodforum);
|
}
$newforum = get_forum($moveto);
| }
$newforum = get_forum($moveto);
|
Zeile 1994 | Zeile 2115 |
---|
error($lang->error_inline_nopostsselected); } if(!is_moderator_by_pids($posts, "candeleteposts"))
|
error($lang->error_inline_nopostsselected); } if(!is_moderator_by_pids($posts, "candeleteposts"))
|
{ error_no_permission(); } $inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread'); }
| { error_no_permission(); } $inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread'); }
|
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
| $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
Zeile 2015 | Zeile 2136 |
---|
// Actually delete the posts in inline moderation case "do_multideleteposts":
|
// Actually delete the posts in inline moderation case "do_multideleteposts":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
Zeile 2044 | Zeile 2165 |
---|
$moderation->delete_post($pid); $plist[] = $pid; $deletecount++;
|
$moderation->delete_post($pid); $plist[] = $pid; $deletecount++;
|
}
| }
|
// If we have multiple threads, we must be coming from the search if(!empty($tids))
|
// If we have multiple threads, we must be coming from the search if(!empty($tids))
|
{
| {
|
foreach($tids as $tid)
|
foreach($tids as $tid)
|
{ $moderation->delete_thread($tid); mark_reports($tid, "thread"); $url = get_forum_link($fid);
| { $moderation->delete_thread($tid); mark_reports($tid, "thread"); $url = get_forum_link($fid);
|
} } // Otherwise we're just deleting from showthread.php
| } } // Otherwise we're just deleting from showthread.php
|
Zeile 2062 | Zeile 2183 |
---|
$query = $db->simple_select("posts", "pid", "tid = $tid"); $numposts = $db->num_rows($query); if(!$numposts)
|
$query = $db->simple_select("posts", "pid", "tid = $tid"); $numposts = $db->num_rows($query); if(!$numposts)
|
{
| {
|
$moderation->delete_thread($tid); mark_reports($tid, "thread"); $url = get_forum_link($fid);
| $moderation->delete_thread($tid); mark_reports($tid, "thread"); $url = get_forum_link($fid);
|
Zeile 2082 | Zeile 2203 |
---|
// Merge posts - Inline moderation case "multimergeposts": add_breadcrumb($lang->nav_multi_mergeposts);
|
// Merge posts - Inline moderation case "multimergeposts": add_breadcrumb($lang->nav_multi_mergeposts);
|
if($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 2161 | Zeile 2282 |
---|
else { clearinline($tid, 'thread');
|
else { clearinline($tid, 'thread');
|
}
| }
|
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
| $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
Zeile 2171 | Zeile 2292 |
---|
// Actually merge the posts - Inline moderation case "do_multimergeposts":
|
// Actually merge the posts - Inline moderation case "do_multimergeposts":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
Zeile 2187 | Zeile 2308 |
---|
}
if(!is_moderator_by_pids($postlist, "canmanagethreads"))
|
}
if(!is_moderator_by_pids($postlist, "canmanagethreads"))
|
{ error_no_permission(); }
$masterpid = $moderation->merge_posts($postlist, $tid, $mybb->input['sep']);
| { error_no_permission(); }
$masterpid = $moderation->merge_posts($postlist, $tid, $mybb->input['sep']);
|
mark_reports($postlist, "posts"); log_moderator_action($modlogdata, $lang->merged_selective_posts);
| mark_reports($postlist, "posts"); log_moderator_action($modlogdata, $lang->merged_selective_posts);
|
Zeile 2202 | Zeile 2323 |
---|
case "multisplitposts": add_breadcrumb($lang->nav_multi_splitposts);
|
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') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread'); } $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
| 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') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread'); } $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";");
| $return_url = htmlspecialchars_uni($mybb->get_input('url'));
eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";");
|
Zeile 2329 | Zeile 2450 |
---|
GROUP BY p.tid, p.pid "); $pcheck = array();
|
GROUP BY p.tid, p.pid "); $pcheck = array();
|
while($tcheck = $db->fetch_array($query)) {
| while($tcheck = $db->fetch_array($query)) {
|
if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost);
| if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost);
|
Zeile 2413 | Zeile 2534 |
---|
// 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 FROM ".TABLE_PREFIX."posts p
| $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
| LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid
|
Zeile 2472 | Zeile 2593 |
---|
// 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'));
|
| $plugins->run_hooks("moderation_do_multimoveposts");
|
// explode at # sign in a url (indicates a name reference) and reassign to the url $realurl = explode("#", $mybb->get_input('threadurl'));
| // explode at # sign in a url (indicates a name reference) and reassign to the url $realurl = explode("#", $mybb->get_input('threadurl'));
|
Zeile 2801 | Zeile 2924 |
---|
require_once MYBB_ROOT."inc/functions_user.php";
$groups = explode(",", $mybb->settings['purgespammergroups']);
|
require_once MYBB_ROOT."inc/functions_user.php";
$groups = explode(",", $mybb->settings['purgespammergroups']);
|
if(!in_array($mybb->user['usergroup'], $groups))
| if(!is_member($groups))
|
{ 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 2945 | Zeile 3068 |
---|
$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']));
|
| $action = $mybb->input['action'];
|
$modtype = $mybb->get_input('modtype'); $inlinetype = $mybb->get_input('inlinetype'); $searchid = $mybb->get_input('searchid');
| $modtype = $mybb->get_input('modtype'); $inlinetype = $mybb->get_input('inlinetype'); $searchid = $mybb->get_input('searchid');
|
Zeile 2956 | Zeile 3080 |
---|
output_page($page); exit; }
|
output_page($page); exit; }
|
| $tool['name'] = htmlspecialchars_uni($tool['name']);
|
if($tool['type'] == 't' && $mybb->get_input('modtype') == 'inlinethread') {
| if($tool['type'] == 't' && $mybb->get_input('modtype') == 'inlinethread') {
|