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_openclose,moderation_delayedmoderation_softdeleterestore,moderation_delayedmoderation_delete,moderation_delayedmoderation_stick,moderation_delayedmoderation_approve";
| $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";
|
Zeile 38 | 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) { $post = get_post($pid); if(!$post) {
|
if($pid) { $post = get_post($pid); if(!$post) {
|
error($lang->error_invalidpost);
| error($lang->error_invalidpost, $lang->error);
|
} $tid = $post['tid']; }
| } $tid = $post['tid']; }
|
Zeile 54 | 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 79 | Zeile 80 |
---|
if(!$pm) {
|
if(!$pm) {
|
error($lang->error_invalidpm);
| error($lang->error_invalidpm, $lang->error);
|
} }
| } }
|
Zeile 197 | 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 248 | 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 290 | 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 417 | Zeile 433 |
---|
else { $display_errors = '';
|
else { $display_errors = '';
|
}
| }
|
$forum_cache = $cache->read("forums");
| $forum_cache = $cache->read("forums");
|
Zeile 434 | Zeile 450 |
---|
);
switch($db->type)
|
);
switch($db->type)
|
{
| {
|
case "pgsql": case "sqlite": $query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
| case "pgsql": case "sqlite": $query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
|
Zeile 443 | Zeile 459 |
---|
$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))
|
$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))
|
{
| {
|
$actions['modtool_'.$tool['tid']] = htmlspecialchars_uni($tool['name']); }
| $actions['modtool_'.$tool['tid']] = htmlspecialchars_uni($tool['name']); }
|
Zeile 452 | Zeile 468 |
---|
if($tid == 0) { // Inline thread moderation is used
|
if($tid == 0) { // Inline thread moderation is used
|
if($mybb->get_input('inlinetype') == 'search') { $tids = getids($mybb->get_input('searchid'), 'search'); } else { $tids = getids($fid, "forum"); } $where_array = array(); switch($db->type)
| if($mybb->get_input('inlinetype') == 'search') { $tids = getids($mybb->get_input('searchid'), 'search'); } else
|
{
|
{
|
case "pgsql": case "sqlite": foreach($tids as $like)
| $tids = getids($fid, "forum"); } $where_array = array(); switch($db->type) { case "pgsql": case "sqlite": foreach($tids as $like)
|
{ $where_array[] = "','||d.tids||',' LIKE '%,".$db->escape_string($like).",%'"; }
| { $where_array[] = "','||d.tids||',' LIKE '%,".$db->escape_string($like).",%'"; }
|
Zeile 500 | Zeile 516 |
---|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid) WHERE ','||d.tids||',' LIKE '%,{$tid},%'
|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid) WHERE ','||d.tids||',' LIKE '%,{$tid},%'
|
ORDER BY d.dateline DESC LIMIT 0, 20
| ORDER BY d.dateline DESC LIMIT 0, 20
|
"); break; default:
| "); break; default:
|
Zeile 543 | 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']);
| if($delayedmod['type'] == 'move') { $delayedmod['link'] = get_forum_link($delayedmod['inputs']['new_forum']);
|
Zeile 564 | Zeile 580 |
---|
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 585 | 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 601 | Zeile 619 |
---|
} if(count($tids) < 1) {
|
} 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 627 | Zeile 645 |
---|
{ $datemonth[$month] = ''; if($mybb->get_input('date_month', MyBB::INPUT_INT) == (int)$month)
|
{ $datemonth[$month] = ''; if($mybb->get_input('date_month', MyBB::INPUT_INT) == (int)$month)
|
{ $datemonth[$month] = ' selected="selected"'; } }
| { $datemonth[$month] = ' selected="selected"'; } }
|
eval('$datemonth = "'.$templates->get('moderation_delayedmoderation_date_month').'";');
|
eval('$datemonth = "'.$templates->get('moderation_delayedmoderation_date_month').'";');
|
Zeile 681 | Zeile 699 |
---|
if(!is_moderator($fid, "canopenclosethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canopenclosethreads")) { error_no_permission();
|
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
if($thread['closed'] == 1)
| }
if($thread['closed'] == 1)
|
Zeile 694 | 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);
| log_moderator_action($modlogdata, $lang->mod_process);
|
Zeile 707 | Zeile 730 |
---|
case "stick": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
case "stick": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
|
|
if(!is_moderator($fid, "canstickunstickthreads"))
|
if(!is_moderator($fid, "canstickunstickthreads"))
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
$plugins->run_hooks("moderation_stick");
| }
$plugins->run_hooks("moderation_stick");
|
Zeile 744 | Zeile 772 |
---|
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_removeredirects");
| }
$plugins->run_hooks("moderation_removeredirects");
|
Zeile 820 | Zeile 853 |
---|
$poll = $db->fetch_array($query); if(!$poll) {
|
$poll = $db->fetch_array($query); if(!$poll) {
|
error($lang->error_invalidpoll);
| error($lang->error_invalidpoll, $lang->error);
|
}
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";");
| }
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";");
|
Zeile 832 | Zeile 865 |
---|
// 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'])) {
| if(!isset($mybb->input['delete'])) {
|
Zeile 848 | Zeile 886 |
---|
$poll = $db->fetch_array($query); if(!$poll) {
|
$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 871 | Zeile 909 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
$thread = get_thread($tid);
| |
|
|
$plugins->run_hooks("moderation_approvethread");
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
$thread = get_thread($tid);
$plugins->run_hooks("moderation_approvethread");
|
$lang->thread_approved = $lang->sprintf($lang->thread_approved, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_approved);
| $lang->thread_approved = $lang->sprintf($lang->thread_approved, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_approved);
|
Zeile 884 | Zeile 928 |
---|
break;
// Unapprove a thread
|
break;
// Unapprove a thread
|
case "unapprovethread":
| case "unapprovethread":
|
// 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, "canapproveunapprovethreads"))
|
if(!is_moderator($fid, "canapproveunapprovethreads"))
|
{
| {
|
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 955 | Zeile 1005 |
---|
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_move");
|
}
$plugins->run_hooks("moderation_move");
|
|
|
$forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto"); eval("\$movethread = \"".$templates->get("moderation_move")."\";"); output_page($movethread); break;
|
$forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto"); eval("\$movethread = \"".$templates->get("moderation_move")."\";"); output_page($movethread); break;
|
|
|
// Let's get this thing moving!
|
// Let's get this thing moving!
|
case "do_move":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| case "do_move":
// 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');
if(!is_moderator($fid, "canmanagethreads"))
|
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); $method = $mybb->get_input('method');
if(!is_moderator($fid, "canmanagethreads"))
|
{ error_no_permission();
| { 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_no_permission();
| 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 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 1124 | Zeile 1186 |
---|
case "pgsql": case "sqlite": $query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
|
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:
| 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))
| $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))
|
Zeile 1208 | 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 1237 | Zeile 1299 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
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(
| log_moderator_action($modlogdata, $lang->thread_notes_edited); $sqlarray = array(
|
Zeile 1264 | Zeile 1326 |
---|
if(!$hostname || $hostname == $post['ipaddress']) { $hostname = $lang->resolve_fail;
|
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 1275 | Zeile 1337 |
---|
{ $ipaddress = $post['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
|
{ $ipaddress = $post['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
|
}
| }
|
$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": 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($lang->nav_pms, "private.php"); $pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
|
Zeile 1318 | Zeile 1389 |
---|
$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(); }
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 1345 | 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 1361 | Zeile 1451 |
---|
preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
if($threadmatch[1])
|
preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
if($threadmatch[1])
|
{
| {
|
$parameters['tid'] = $threadmatch[1]; }
| $parameters['tid'] = $threadmatch[1]; }
|
Zeile 1377 | Zeile 1467 |
---|
$temp = explode("&", my_substr($splitloc[1], 1));
if(!empty($temp))
|
$temp = explode("&", my_substr($splitloc[1], 1));
if(!empty($temp))
|
{
| {
|
for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2);
| for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2);
|
Zeile 1403 | Zeile 1493 |
---|
else { $mergetid = 0;
|
else { $mergetid = 0;
|
}
| }
|
$mergethread = get_thread($mergetid); if(!$mergethread) {
|
$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"))
|
} if(!is_moderator($mergethread['fid'], "canmanagethreads"))
|
{
| {
|
error_no_permission(); } if(isset($mybb->input['subject']))
|
error_no_permission(); } if(isset($mybb->input['subject']))
|
{
| {
|
$subject = $mybb->get_input('subject'); } else
|
$subject = $mybb->get_input('subject'); } else
|
{
| {
|
$subject = $thread['subject'];
|
$subject = $thread['subject'];
|
}
$moderation->merge_threads($mergetid, $tid, $subject);
| }
$moderation->merge_threads($mergetid, $tid, $subject);
|
log_moderator_action($modlogdata, $lang->thread_merged);
moderation_redirect(get_thread_link($tid), $lang->redirect_threadsmerged);
| log_moderator_action($modlogdata, $lang->thread_merged);
moderation_redirect(get_thread_link($tid), $lang->redirect_threadsmerged);
|
Zeile 1440 | 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
| $query = $db->query(" SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p
|
Zeile 1447 | Zeile 1543 |
---|
WHERE tid='$tid' ORDER BY dateline ASC ");
|
WHERE tid='$tid' ORDER BY dateline 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 1489 | Zeile 1586 |
---|
// Let's break them up buddy! (Do the split) case "do_split":
|
// Let's break them up buddy! (Do the split) case "do_split":
|
|
|
// 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();
|
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 1503 | 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 1530 | 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 1564 | Zeile 1666 |
---|
error_no_permission(); }
|
error_no_permission(); }
|
$plugins->run_hooks("moderation_removesubscriptions");
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
|
|
$moderation->remove_thread_subscriptions($tid, true);
| $plugins->run_hooks("moderation_removesubscriptions");
$moderation->remove_thread_subscriptions($tid, true);
|
log_moderator_action($modlogdata, $lang->removed_subscriptions);
| log_moderator_action($modlogdata, $lang->removed_subscriptions);
|
Zeile 1576 | Zeile 1683 |
---|
// 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
|
Zeile 1596 | Zeile 1703 |
---|
} if(count($threads) < 1) {
|
} if(count($threads) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$inlineids = implode("|", $threads);
| }
$inlineids = implode("|", $threads);
|
Zeile 1644 | Zeile 1751 |
---|
break;
// Open threads - Inline moderation
|
break;
// 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');
| 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(!is_moderator($fid, 'canopenclosethreads')) { error_no_permission(); } }
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
$moderation->open_threads($threads);
| if(count($threads) < 1) { error($lang->error_inline_nothreadsselected, $lang->error); }
$moderation->open_threads($threads);
|
log_moderator_action($modlogdata, $lang->multi_opened_threads); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
log_moderator_action($modlogdata, $lang->multi_opened_threads); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
}
| }
|
else { clearinline($fid, 'forum');
| else { clearinline($fid, 'forum');
|
Zeile 1688 | Zeile 1795 |
---|
// Close threads - Inline moderation case "multiclosethreads":
|
// Close threads - Inline moderation case "multiclosethreads":
|
|
|
// 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 1701 | Zeile 1808 |
---|
error_no_permission(); } }
|
error_no_permission(); } }
|
else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads')) { error_no_permission(); } }
| else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads')) { error_no_permission(); } }
|
if(count($threads) < 1)
|
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')
| { 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');
|
{ 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')) {
| 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_no_permission(); } } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$moderation->approve_threads($threads, $fid);
| $moderation->approve_threads($threads, $fid);
|
Zeile 1764 | Zeile 1871 |
---|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
{
| {
|
clearinline($fid, 'forum'); } $cache->update_stats();
| clearinline($fid, 'forum'); } $cache->update_stats();
|
Zeile 1782 | 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(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads')) {
| { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads')) {
|
error_no_permission(); } } if(count($threads) < 1)
|
error_no_permission(); } } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$moderation->unapprove_threads($threads, $fid);
| $moderation->unapprove_threads($threads, $fid);
|
Zeile 1807 | Zeile 1914 |
---|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
{
| {
|
clearinline($fid, 'forum'); } $cache->update_stats();
| clearinline($fid, 'forum'); } $cache->update_stats();
|
Zeile 1825 | 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(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canrestorethreads')) {
| { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canrestorethreads')) {
|
error_no_permission(); } } if(count($threads) < 1)
|
error_no_permission(); } } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$moderation->restore_threads($threads);
| $moderation->restore_threads($threads);
|
Zeile 1850 | Zeile 1957 |
---|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
{
| {
|
clearinline($fid, 'forum'); } $cache->update_stats();
| clearinline($fid, 'forum'); } $cache->update_stats();
|
Zeile 1868 | 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(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'cansoftdeletethreads')) { error_no_permission(); } } if(count($threads) < 1)
| { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'cansoftdeletethreads')) { error_no_permission(); } } 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); if($mybb->get_input('inlinetype') == 'search')
|
}
$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');
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
clearinline($fid, 'forum'); } $cache->update_stats();
| clearinline($fid, 'forum'); } $cache->update_stats();
|
Zeile 1902 | Zeile 2009 |
---|
// Stick threads - Inline moderation case "multistickthreads":
|
// 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')) {
| // 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)
|
error_no_permission(); } } 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 1936 | Zeile 2043 |
---|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
{
| {
|
clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsstuck); break;
|
clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsstuck); break;
|
|
|
// Unstick threads - Inline moderaton case "multiunstickthreads":
| // Unstick threads - Inline moderaton case "multiunstickthreads":
|
Zeile 1953 | Zeile 2060 |
---|
// 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(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads')) { error_no_permission();
| { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads')) { error_no_permission();
|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$moderation->unstick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_unstuck_threads); if($mybb->get_input('inlinetype') == 'search')
|
$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'); } else
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
Zeile 2001 | Zeile 2108 |
---|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads'))
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads'))
|
{ error_no_permission(); } }
| { error_no_permission(); } }
|
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 2027 | 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_post_check($mybb->get_input('my_post_key'));
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); $threadlist = explode("|", $mybb->get_input('threads')); if(!is_moderator_by_tids($threadlist, 'canmanagethreads'))
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$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 2044 | Zeile 2151 |
---|
// Make sure moderator has permission to move to the new forum $newperms = forum_permissions($moveto); if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, 'canmovetononmodforum'))
|
// Make sure moderator has permission to move to the new forum $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, $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);
log_moderator_action($modlogdata, $lang->multi_moved_threads);
moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved); break;
|
$moderation->move_threads($tids, $moveto);
log_moderator_action($modlogdata, $lang->multi_moved_threads);
moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved); break;
|
|
|
// 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') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); }
| if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } 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);
|
} if(!is_moderator_by_pids($posts, "candeleteposts")) {
| } if(!is_moderator_by_pids($posts, "candeleteposts")) {
|
Zeile 2179 | Zeile 2286 |
---|
// Add the selected posts from other threads foreach($mybb->cookies as $key => $value)
|
// Add the selected posts from other threads foreach($mybb->cookies as $key => $value)
|
{
| {
|
if(strpos($key, "inlinemod_thread") !== false && $key != "inlinemod_thread$tid") { $inlinepostlist = explode("|", $mybb->cookies[$key]);
| if(strpos($key, "inlinemod_thread") !== false && $key != "inlinemod_thread$tid") { $inlinepostlist = explode("|", $mybb->cookies[$key]);
|
Zeile 2199 | Zeile 2306 |
---|
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 2263 | Zeile 2370 |
---|
$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 2286 | Zeile 2393 |
---|
// 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') { $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');
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
Zeile 2369 | Zeile 2476 |
---|
// Actually split the posts - Inline moderation case "do_multisplitposts":
|
// 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;
| // 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))
|
} }
if(empty($posts))
|
{ error($lang->error_inline_nopostsselected); }
| { error($lang->error_inline_nopostsselected, $lang->error); }
|
$pidin = implode(',', $posts);
| $pidin = implode(',', $posts);
|
Zeile 2418 | Zeile 2525 |
---|
{ 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'];
| // 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
|
} } if(count($pcheck2) != count($pcheck)) { // 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'])) { $moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);
|
if(isset($mybb->input['moveto'])) { $moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);
|
}
| }
|
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 2479 | Zeile 2586 |
---|
{ $posts = getids($mybb->get_input('searchid'), '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); }
if(!is_moderator_by_pids($posts, "canmanagethreads"))
| { error($lang->error_inline_nopostsselected, $lang->error); }
if(!is_moderator_by_pids($posts, "canmanagethreads"))
|
{ error_no_permission();
|
{ error_no_permission();
|
}
| }
|
$posts = array_map('intval', $posts);
|
$posts = array_map('intval', $posts);
|
$pidin = implode(',', $posts);
// 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 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 moving 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))
| $pidin = implode(',', $posts);
// 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 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 moving 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) {
| { if($tcheck['count'] > 0) {
|
Zeile 2535 | Zeile 2642 |
---|
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);
|
}
$inlineids = implode("|", $posts);
| }
$inlineids = implode("|", $posts);
|
Zeile 2620 | Zeile 2727 |
---|
$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 2652 | Zeile 2759 |
---|
}
if(empty($posts))
|
}
if(empty($posts))
|
{ error($lang->error_inline_nopostsselected); }
| { error($lang->error_inline_nopostsselected, $lang->error); }
|
$pidin = implode(',', $posts);
// 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
|
$pidin = implode(',', $posts);
// 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)
|
GROUP BY p.tid, p.pid ");
| GROUP BY p.tid, p.pid ");
|
$threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1)
|
$threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) { 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 2688 | Zeile 2795 |
---|
"); $pcheck2 = array(); while($tcheck = $db->fetch_array($query))
|
"); $pcheck2 = array(); while($tcheck = $db->fetch_array($query))
|
{
| {
|
if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid'];
| if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid'];
|
Zeile 2697 | Zeile 2804 |
---|
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);
$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);
|
$newtid = $moderation->split_posts($posts, $tid, $newthread['fid'], $db->escape_string($newthread['subject']), $newtid);
$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;
|
Zeile 2716 | Zeile 2823 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search')
|
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 2724 | Zeile 2831 |
---|
$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();
|
Zeile 2738 | Zeile 2845 |
---|
{ $pids[] = (int)$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($tid, 'thread');
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread');
|
}
| }
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved); break;
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved); break;
|
Zeile 2764 | Zeile 2871 |
---|
$posts = getids($mybb->get_input('searchid'), 'search'); } else
|
$posts = getids($mybb->get_input('searchid'), 'search'); } else
|
{
| {
|
$posts = getids($tid, 'thread');
|
$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();
if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))
| $pids = array();
if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))
|
Zeile 2786 | Zeile 2893 |
---|
$moderation->unapprove_posts($pids);
log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
|
$moderation->unapprove_posts($pids);
log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
|
if($mybb->get_input('inlinetype') == 'search')
| 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 2813 | Zeile 2920 |
---|
} 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, "canrestoreposts"))
| }
if(!is_moderator_by_pids($posts, "canrestoreposts"))
|
Zeile 2857 | Zeile 2964 |
---|
if(count($posts) < 1) {
|
if(count($posts) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
} $pids = array();
| } $pids = array();
|
Zeile 2872 | Zeile 2979 |
---|
$moderation->soft_delete_posts($pids); log_moderator_action($modlogdata, $lang->multi_soft_delete_posts);
|
$moderation->soft_delete_posts($pids); log_moderator_action($modlogdata, $lang->multi_soft_delete_posts);
|
|
|
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');
|
Zeile 2893 | Zeile 3000 |
---|
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 2992 | Zeile 3099 |
---|
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 3024 | Zeile 3131 |
---|
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'])) { add_breadcrumb($lang->confirm_execute_tool);
|
}
if(!empty($options['confirmation']) && empty($mybb->input['confirm'])) { add_breadcrumb($lang->confirm_execute_tool);
|
$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 3043 | Zeile 3156 |
---|
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') {
|
Zeile 3056 | Zeile 3171 |
---|
} 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 3066 | Zeile 3181 |
---|
$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);
| }
$custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids);
|
Zeile 3097 | Zeile 3212 |
---|
$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);
|
}
$ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tid);
| }
$ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tid);
|
Zeile 3128 | Zeile 3243 |
---|
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 3257 | Zeile 3372 |
---|
$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);
|