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 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 1200 | Zeile 1297 |
---|
$plugins->run_hooks('moderation_getip');
|
$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": 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(); }
$plugins->run_hooks("moderation_merge");
|
eval("\$merge = \"".$templates->get("moderation_merge")."\";"); output_page($merge); break;
| eval("\$merge = \"".$templates->get("moderation_merge")."\";"); output_page($merge); break;
|
Zeile 1267 | Zeile 1382 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
|
|
$plugins->run_hooks("moderation_do_merge");
// explode at # sign in a url (indicates a name reference) and reassign to the url
| $plugins->run_hooks("moderation_do_merge");
// explode at # sign in a url (indicates a name reference) and reassign to the url
|
Zeile 1276 | Zeile 1391 |
---|
// Are we using an SEO URL? if(substr($mybb->input['threadurl'], -4) == "html")
|
// Are we using an SEO URL? if(substr($mybb->input['threadurl'], -4) == "html")
|
{
| {
|
// Get thread to merge's tid the SEO way preg_match("#thread-([0-9]+)?#i", $mybb->input['threadurl'], $threadmatch); preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
| // Get thread to merge's tid the SEO way preg_match("#thread-([0-9]+)?#i", $mybb->input['threadurl'], $threadmatch); preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
|
Zeile 1372 | Zeile 1487 |
---|
if($numposts <= 1) { error($lang->error_cantsplitonepost);
|
if($numposts <= 1) { error($lang->error_cantsplitonepost);
|
}
| }
|
$altbg = "trow1"; $posts = ''; while($post = $db->fetch_array($query))
| $altbg = "trow1"; $posts = ''; while($post = $db->fetch_array($query))
|
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");
| $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
$plugins->run_hooks("moderation_split");
|
Zeile 1892 | 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');
|
}
| }
|
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunstuck); break;
| moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunstuck); break;
|
Zeile 1908 | 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(); } }
| error_no_permission(); } }
|
Zeile 1930 | 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 1943 | 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 1953 | 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 1964 | 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 1998 | 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 2019 | 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 2048 | 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 2066 | 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 2086 | 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 2165 | 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 2175 | 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 2191 | 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 2205 | Zeile 2322 |
---|
// 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') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread'); }
| 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'));
| $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
Zeile 2333 | 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 2417 | 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 2476 | 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 2805 | 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 2949 | 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 2960 | 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') {
|