Zeile 39 | Zeile 39 |
---|
$fid = $mybb->get_input('fid', MyBB::INPUT_INT); $pmid = $mybb->get_input('pmid', MyBB::INPUT_INT); $modal = $mybb->get_input('modal', 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($mybb->user['uid'] == 0) { error_no_permission(); }
|
if($pid) {
| if($pid) {
|
Zeile 420 | Zeile 426 |
---|
$method_selected = array('move' => 'checked="checked"', 'redirect' => '', 'copy' => '');
$mybb->input['delayedmoderation']['redirect_expire'] = '';
|
$method_selected = array('move' => 'checked="checked"', 'redirect' => '', 'copy' => '');
$mybb->input['delayedmoderation']['redirect_expire'] = '';
|
$mybb->input['delayedmoderation']['subject'] = $thread['subject'];
| $mybb->input['delayedmoderation']['subject'] = isset($thread['subject']) ? $thread['subject'] : '';
|
$mybb->input['delayedmoderation']['threadurl'] = '';
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "delayedmoderation[new_forum]");
| $mybb->input['delayedmoderation']['threadurl'] = '';
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "delayedmoderation[new_forum]");
|
Zeile 532 | Zeile 538 |
---|
"); } }
|
"); } }
|
|
|
while($delayedmod = $db->fetch_array($query)) {
|
while($delayedmod = $db->fetch_array($query)) {
|
$delayedmod['dateline'] = my_date("jS M Y, {$mybb->settings['timeformat']}", $delayedmod['delaydateline']);
| $delayedmod['dateline'] = my_date('normal', $delayedmod['delaydateline'], "", 2);
|
$delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']];
| $delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']];
|
Zeile 553 | Zeile 559 |
---|
}
if($delayedmod['fname'])
|
}
if($delayedmod['fname'])
|
{
| {
|
$delayedmod['link'] = get_forum_link($delayedmod['fid']); $delayedmod['fname'] = htmlspecialchars_uni($delayedmod['fname']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_forum")."\";");
| $delayedmod['link'] = get_forum_link($delayedmod['fid']); $delayedmod['fname'] = htmlspecialchars_uni($delayedmod['fname']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_forum")."\";");
|
Zeile 594 | Zeile 600 |
---|
{ $cols = 5; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";");
|
{ $cols = 5; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";");
|
}
| }
|
$url = ''; if($mybb->get_input('tid', MyBB::INPUT_INT))
|
$url = ''; if($mybb->get_input('tid', MyBB::INPUT_INT))
|
{
| {
|
$lang->threads = $lang->thread; $thread['link'] = get_thread_link($tid); $delayedmoderation_subject = $mybb->input['delayedmoderation']['subject'];
| $lang->threads = $lang->thread; $thread['link'] = get_thread_link($tid); $delayedmoderation_subject = $mybb->input['delayedmoderation']['subject'];
|
Zeile 614 | Zeile 620 |
---|
$url = htmlspecialchars_uni($mybb->get_input('url')); } else
|
$url = htmlspecialchars_uni($mybb->get_input('url')); } else
|
{
| {
|
$tids = getids($fid, "forum"); } if(count($tids) < 1)
| $tids = getids($fid, "forum"); } if(count($tids) < 1)
|
Zeile 655 | Zeile 661 |
---|
$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').'";');
|
$openclosethread = ''; if(is_moderator($fid, "canopenclosethreads")) { eval('$openclosethread = "'.$templates->get('moderation_delayedmoderation_openclose').'";');
|
}
| }
|
$softdeleterestorethread = ''; if(is_moderator($fid, "cansoftdeletethreads") || is_moderator($fid, "canrestorethreads"))
| $softdeleterestorethread = ''; if(is_moderator($fid, "cansoftdeletethreads") || is_moderator($fid, "canrestorethreads"))
|
Zeile 670 | Zeile 676 |
---|
$deletethread = ''; if(is_moderator($fid, "candeletethreads"))
|
$deletethread = ''; if(is_moderator($fid, "candeletethreads"))
|
{
| {
|
eval('$deletethread = "'.$templates->get('moderation_delayedmoderation_delete').'";'); }
$stickunstickthread = ''; if(is_moderator($fid, "canstickunstickthreads"))
|
eval('$deletethread = "'.$templates->get('moderation_delayedmoderation_delete').'";'); }
$stickunstickthread = ''; if(is_moderator($fid, "canstickunstickthreads"))
|
{
| {
|
eval('$stickunstickthread = "'.$templates->get('moderation_delayedmoderation_stick').'";');
|
eval('$stickunstickthread = "'.$templates->get('moderation_delayedmoderation_stick').'";');
|
}
| }
|
$approveunapprovethread = ''; if(is_moderator($fid, "canapproveunapprovethreads")) {
| $approveunapprovethread = ''; if(is_moderator($fid, "canapproveunapprovethreads")) {
|
Zeile 697 | Zeile 703 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canopenclosethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canopenclosethreads"))
|
{ error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
| { error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
if($thread['closed'] == 1) { $openclose = $lang->opened; $redirect = $lang->redirect_openthread;
|
if($thread['closed'] == 1) { $openclose = $lang->opened; $redirect = $lang->redirect_openthread;
|
$moderation->open_threads($tid);
| $moderation->open_threads($tid);
|
} else { $openclose = $lang->closed; $redirect = $lang->redirect_closethread; $moderation->close_threads($tid);
|
} else { $openclose = $lang->closed; $redirect = $lang->redirect_closethread; $moderation->close_threads($tid);
|
}
| }
|
$lang->mod_process = $lang->sprintf($lang->mod_process, $openclose);
log_moderator_action($modlogdata, $lang->mod_process);
| $lang->mod_process = $lang->sprintf($lang->mod_process, $openclose);
log_moderator_action($modlogdata, $lang->mod_process);
|
Zeile 732 | Zeile 738 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canstickunstickthreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canstickunstickthreads"))
|
{ error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
$plugins->run_hooks("moderation_stick");
| { error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
$plugins->run_hooks("moderation_stick");
|
if($thread['sticky'] == 1) { $stuckunstuck = $lang->unstuck;
| if($thread['sticky'] == 1) { $stuckunstuck = $lang->unstuck;
|
Zeile 813 | Zeile 819 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "candeletethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "candeletethreads"))
|
{ if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
$plugins->run_hooks("moderation_do_deletethread");
| { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
$plugins->run_hooks("moderation_do_deletethread");
|
// Log the subject of the deleted thread $modlogdata['thread_subject'] = $thread['subject'];
| // Log the subject of the deleted thread $modlogdata['thread_subject'] = $thread['subject'];
|
Zeile 830 | Zeile 836 |
---|
log_moderator_action($modlogdata, $lang->thread_deleted);
$moderation->delete_thread($tid);
|
log_moderator_action($modlogdata, $lang->thread_deleted);
$moderation->delete_thread($tid);
|
|
|
mark_reports($tid, "thread"); moderation_redirect(get_forum_link($fid), $lang->redirect_threaddeleted); break;
| mark_reports($tid, "thread"); moderation_redirect(get_forum_link($fid), $lang->redirect_threaddeleted); break;
|
Zeile 840 | Zeile 846 |
---|
add_breadcrumb($lang->nav_deletepoll);
if(!is_moderator($fid, "canmanagepolls"))
|
add_breadcrumb($lang->nav_deletepoll);
if(!is_moderator($fid, "canmanagepolls"))
|
{
| {
|
if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
|
if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
|
}
| }
|
$plugins->run_hooks("moderation_deletepoll");
| $plugins->run_hooks("moderation_deletepoll");
|
Zeile 858 | Zeile 864 |
---|
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";"); output_page($deletepoll);
|
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";"); output_page($deletepoll);
|
break;
| break;
|
// Delete the actual poll here! case "do_deletepoll":
| // Delete the actual poll here! case "do_deletepoll":
|
Zeile 869 | Zeile 875 |
---|
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
| }
|
if(!isset($mybb->input['delete'])) { error($lang->redirect_pollnotdeleted);
|
if(!isset($mybb->input['delete'])) { error($lang->redirect_pollnotdeleted);
|
}
| }
|
if(!is_moderator($fid, "canmanagepolls")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
| if(!is_moderator($fid, "canmanagepolls")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
|
Zeile 897 | Zeile 903 |
---|
$moderation->delete_poll($poll['pid']);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_polldeleted);
|
$moderation->delete_poll($poll['pid']);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_polldeleted);
|
break;
| break;
|
// Approve a thread case "approvethread":
|
// Approve a thread case "approvethread":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canapproveunapprovethreads")) { error_no_permission(); }
if($thread['visible'] == -1)
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canapproveunapprovethreads")) { error_no_permission(); }
if($thread['visible'] == -1)
|
{ error($lang->error_thread_deleted, $lang->error); }
| { error($lang->error_thread_deleted, $lang->error); }
|
Zeile 929 | Zeile 935 |
---|
// Unapprove a thread case "unapprovethread":
|
// Unapprove a thread 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);
|
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 957 | Zeile 963 |
---|
// Restore a thread case "restorethread":
|
// Restore a thread case "restorethread":
|
|
|
// 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 975 | Zeile 981 |
---|
$moderation->restore_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored);
|
$moderation->restore_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored);
|
break;
| break;
|
// Soft delete a thread case "softdeletethread":
| // Soft delete a thread case "softdeletethread":
|
Zeile 984 | Zeile 990 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "cansoftdeletethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "cansoftdeletethreads"))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
$thread = get_thread($tid);
$plugins->run_hooks("moderation_softdeletethread");
| $thread = get_thread($tid);
$plugins->run_hooks("moderation_softdeletethread");
|
Zeile 995 | Zeile 1001 |
---|
log_moderator_action($modlogdata, $lang->thread_soft_deleted);
$moderation->soft_delete_threads($tid);
|
log_moderator_action($modlogdata, $lang->thread_soft_deleted);
$moderation->soft_delete_threads($tid);
|
|
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadsoftdeleted); break;
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadsoftdeleted); break;
|
Zeile 1005 | Zeile 1011 |
---|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
}
| }
|
if($thread['visible'] == -1) {
| if($thread['visible'] == -1) {
|
Zeile 1014 | Zeile 1020 |
---|
$plugins->run_hooks("moderation_move");
|
$plugins->run_hooks("moderation_move");
|
$forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto");
| $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
eval("\$movethread = \"".$templates->get("moderation_move")."\";"); output_page($movethread); break;
| eval("\$movethread = \"".$templates->get("moderation_move")."\";"); output_page($movethread); break;
|
Zeile 1136 | Zeile 1142 |
---|
$modactions = ''; while($modaction = $db->fetch_array($query)) {
|
$modactions = ''; while($modaction = $db->fetch_array($query)) {
|
$modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);
| $modaction['dateline'] = my_date('relative', $modaction['dateline']);
|
$modaction['username'] = htmlspecialchars_uni($modaction['username']); $modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']); $modaction['action'] = htmlspecialchars_uni($modaction['action']);
| $modaction['username'] = htmlspecialchars_uni($modaction['username']); $modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']); $modaction['action'] = htmlspecialchars_uni($modaction['action']);
|
Zeile 1226 | Zeile 1232 |
---|
$delayedmods = ''; while($delayedmod = $db->fetch_array($query)) {
|
$delayedmods = ''; while($delayedmod = $db->fetch_array($query)) {
|
$delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);
| $delayedmod['dateline'] = my_date('normal', $delayedmod['delaydateline'], "", 2);
|
$delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']];
| $delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']];
|
Zeile 1365 | Zeile 1371 |
---|
add_breadcrumb($pm['subject'], "private.php?action=read&pmid={$pmid}"); add_breadcrumb($lang->nav_getpmip); if(!$mybb->usergroup['issupermod'])
|
add_breadcrumb($pm['subject'], "private.php?action=read&pmid={$pmid}"); add_breadcrumb($lang->nav_getpmip); if(!$mybb->usergroup['issupermod'])
|
{ error_no_permission(); }
| { error_no_permission(); }
|
$pm['ipaddress'] = my_inet_ntop($db->unescape_binary($pm['ipaddress'])); $hostname = @gethostbyaddr($pm['ipaddress']); if(!$hostname || $hostname == $pm['ipaddress']) { $hostname = $lang->resolve_fail;
|
$pm['ipaddress'] = my_inet_ntop($db->unescape_binary($pm['ipaddress'])); $hostname = @gethostbyaddr($pm['ipaddress']); if(!$hostname || $hostname == $pm['ipaddress']) { $hostname = $lang->resolve_fail;
|
}
| }
|
$name = $db->fetch_field($db->simple_select('users', 'username', "uid = {$pm['fromid']}"), 'username'); $username = build_profile_link($name, $pm['fromid']);
| $name = $db->fetch_field($db->simple_select('users', 'username', "uid = {$pm['fromid']}"), 'username'); $username = build_profile_link($name, $pm['fromid']);
|
Zeile 1394 | Zeile 1400 |
---|
eval("\$getpmip = \"".$templates->get("moderation_getpmip_modal", 1, 0)."\";"); echo $getpmip; exit;
|
eval("\$getpmip = \"".$templates->get("moderation_getpmip_modal", 1, 0)."\";"); echo $getpmip; exit;
|
}
| }
|
else { eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";");
| else { eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";");
|
Zeile 1405 | Zeile 1411 |
---|
// 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(); }
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
|
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
Zeile 1526 | Zeile 1532 |
---|
// Divorce the posts in this thread (Split!) case "split": add_breadcrumb($lang->nav_split);
|
// Divorce the posts in this thread (Split!) case "split": add_breadcrumb($lang->nav_split);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
$query = $db->query("
| }
$query = $db->query("
|
Zeile 1541 | Zeile 1547 |
---|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid) WHERE tid='$tid'
|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid) WHERE tid='$tid'
|
ORDER BY dateline ASC
| ORDER BY dateline ASC, pid ASC
|
");
$numposts = $db->num_rows($query);
| ");
$numposts = $db->num_rows($query);
|
Zeile 1697 | Zeile 1703 |
---|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'candeletethreads'))
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'candeletethreads'))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
} if(count($threads) < 1) {
| } if(count($threads) < 1) {
|
Zeile 1751 | Zeile 1757 |
---|
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'); if(!is_moderator($fid, 'canopenclosethreads')) { error_no_permission(); } }
if(count($threads) < 1)
| case "multiopenthreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads')) { error_no_permission(); } }
if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected, $lang->error); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
Zeile 1789 | Zeile 1795 |
---|
else { clearinline($fid, 'forum');
|
else { clearinline($fid, 'forum');
|
}
| }
|
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsopened); break;
| moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsopened); break;
|
Zeile 1812 | Zeile 1818 |
---|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads'))
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads'))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
} if(count($threads) < 1)
|
} if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected, $lang->error); }
| { 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');
|
$moderation->close_threads($threads);
log_moderator_action($modlogdata, $lang->multi_closed_threads); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsclosed); break;
// Approve threads - Inline moderation
|
clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsclosed); break;
// Approve threads - Inline moderation
|
case "multiapprovethreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canapproveunapprovethreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum');
| 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(!is_moderator($fid, 'canapproveunapprovethreads')) { error_no_permission(); }
|
}
| }
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected, $lang->error);
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected, $lang->error);
|
}
| }
|
$moderation->approve_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_approved_threads); if($mybb->get_input('inlinetype') == 'search')
|
$moderation->approve_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_approved_threads); if($mybb->get_input('inlinetype') == 'search')
|
{
| {
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
Zeile 1879 | Zeile 1885 |
---|
break;
// Unapprove threads - Inline moderation
|
break;
// Unapprove threads - Inline moderation
|
case "multiunapprovethreads":
// 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(); }
| case "multiunapprovethreads":
// 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 {
| } else {
|
Zeile 1904 | Zeile 1910 |
---|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected, $lang->error);
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$moderation->unapprove_threads($threads, $fid);
| }
$moderation->unapprove_threads($threads, $fid);
|
log_moderator_action($modlogdata, $lang->multi_unapproved_threads); if($mybb->get_input('inlinetype') == 'search')
| log_moderator_action($modlogdata, $lang->multi_unapproved_threads); if($mybb->get_input('inlinetype') == 'search')
|
Zeile 1922 | Zeile 1928 |
---|
break;
// Restore threads - Inline moderation
|
break;
// Restore threads - Inline moderation
|
case "multirestorethreads":
// 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');
| case "multirestorethreads":
// 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, 'canrestorethreads'))
|
if(!is_moderator_by_tids($threads, 'canrestorethreads'))
|
{ error_no_permission(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1947 | Zeile 1953 |
---|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected, $lang->error);
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$moderation->restore_threads($threads);
log_moderator_action($modlogdata, $lang->multi_restored_threads); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($fid, 'forum'); } $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsrestored); break;
// Soft delete threads - Inline moderation case "multisoftdeletethreads":
// 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, 'cansoftdeletethreads')) { 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, $lang->error); }
$moderation->soft_delete_threads($threads);
| }
$moderation->restore_threads($threads);
|
|
|
log_moderator_action($modlogdata, $lang->multi_soft_deleted_threads);
| log_moderator_action($modlogdata, $lang->multi_restored_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');
|
Zeile 2004 | Zeile 1967 |
---|
clearinline($fid, 'forum'); } $cache->update_stats();
|
clearinline($fid, 'forum'); } $cache->update_stats();
|
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadssoftdeleted);
| moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsrestored);
|
break;
|
break;
|
// Stick threads - Inline moderation case "multistickthreads":
| // Soft delete threads - Inline moderation case "multisoftdeletethreads":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
Zeile 2017 | Zeile 1980 |
---|
{ // From search page $threads = getids($mybb->get_input('searchid'), 'search');
|
{ // From search page $threads = getids($mybb->get_input('searchid'), 'search');
|
if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))
| if(!is_moderator_by_tids($threads, 'cansoftdeletethreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'cansoftdeletethreads'))
|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
| } if(count($threads) < 1) { 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') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
|
} else {
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads')) { error_no_permission(); }
| clearinline($fid, 'forum');
|
}
|
}
|
if(count($threads) < 1)
| $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadssoftdeleted); break;
// Stick threads - Inline moderation case "multistickthreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canstickunstickthreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads')) { error_no_permission(); } } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected, $lang->error); }
$moderation->stick_threads($threads);
|
{ error($lang->error_inline_nothreadsselected, $lang->error); }
$moderation->stick_threads($threads);
|
|
|
log_moderator_action($modlogdata, $lang->multi_stuck_threads); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
log_moderator_action($modlogdata, $lang->multi_stuck_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 2051 | Zeile 2057 |
---|
// Unstick threads - Inline moderaton case "multiunstickthreads":
|
// Unstick threads - Inline moderaton case "multiunstickthreads":
|
|
|
// 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 2068 | Zeile 2074 |
---|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads'))
|
{ $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, $lang->error); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
Zeile 2155 | Zeile 2161 |
---|
if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, 'canmovetononmodforum')) { error($lang->error_movetononmodforum, $lang->error);
|
if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, 'canmovetononmodforum')) { 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, $lang->error); }
|
error($lang->error_invalidforum, $lang->error); }
|
|
|
$plugins->run_hooks('moderation_do_multimovethreads');
|
$plugins->run_hooks('moderation_do_multimovethreads');
|
|
|
log_moderator_action($modlogdata, $lang->multi_moved_threads); $expire = 0; if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0)
| log_moderator_action($modlogdata, $lang->multi_moved_threads); $expire = 0; if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0)
|
Zeile 2178 | Zeile 2184 |
---|
moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved); break;
|
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);
|
Zeile 2188 | Zeile 2194 |
---|
$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, $lang->error); } if(!is_moderator_by_pids($posts, "candeleteposts")) {
| error($lang->error_inline_nopostsselected, $lang->error); } if(!is_moderator_by_pids($posts, "candeleteposts")) {
|
error_no_permission(); } $inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search')
|
error_no_permission(); } $inlineids = implode("|", $posts); 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 2237 | Zeile 2243 |
---|
while($threadid = $db->fetch_field($query, "tid")) { $tids[] = $threadid;
|
while($threadid = $db->fetch_field($query, "tid")) { $tids[] = $threadid;
|
}
| }
|
}
$deletecount = 0;
| }
$deletecount = 0;
|
Zeile 2315 | Zeile 2321 |
---|
} }
|
} }
|
if(empty($posts))
| if(count($posts) < 2)
|
{
|
{
|
error($lang->error_inline_nopostsselected, $lang->error);
| if(empty($posts)) { error($lang->error_inline_nopostsselected, $lang->error); } error($lang->error_nomergeposts, $lang->error);
|
}
if(!is_moderator_by_pids($posts, "canmanagethreads"))
| }
if(!is_moderator_by_pids($posts, "canmanagethreads"))
|
Zeile 2330 | Zeile 2340 |
---|
SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
|
SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
|
WHERE pid IN (".implode($posts, ",").") ORDER BY dateline ASC
| WHERE pid IN (".implode(",", $posts).") ORDER BY dateline ASC, pid ASC
|
"); $altbg = "trow1"; while($post = $db->fetch_array($query))
| "); $altbg = "trow1"; while($post = $db->fetch_array($query))
|
Zeile 2356 | Zeile 2366 |
---|
$altbg = alt_trow(); }
|
$altbg = alt_trow(); }
|
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread'); }
| $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'));
eval("\$multimerge = \"".$templates->get("moderation_inline_mergeposts")."\";"); output_page($multimerge);
|
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
eval("\$multimerge = \"".$templates->get("moderation_inline_mergeposts")."\";"); output_page($multimerge);
|
break;
| break;
|
// Actually merge the posts - Inline moderation case "do_multimergeposts":
| // Actually merge the posts - Inline moderation case "do_multimergeposts":
|
Zeile 2379 | Zeile 2389 |
---|
verify_post_check($mybb->get_input('my_post_key'));
$mergepost = $mybb->get_input('mergepost', MyBB::INPUT_ARRAY);
|
verify_post_check($mybb->get_input('my_post_key'));
$mergepost = $mybb->get_input('mergepost', MyBB::INPUT_ARRAY);
|
if(count($mergepost) <= 1)
| if(count($mergepost) < 2)
|
{ error($lang->error_nomergeposts, $lang->error);
|
{ error($lang->error_nomergeposts, $lang->error);
|
}
| }
|
foreach($mergepost as $pid => $yes) { $postlist[] = (int)$pid;
|
foreach($mergepost as $pid => $yes) { $postlist[] = (int)$pid;
|
}
| }
|
if(!is_moderator_by_pids($postlist, "canmanagethreads")) {
| if(!is_moderator_by_pids($postlist, "canmanagethreads")) {
|
Zeile 2404 | Zeile 2414 |
---|
// 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, $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
| 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)
| 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)
|
Zeile 2488 | Zeile 2498 |
---|
// 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'));
| // 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)
| $plist = array(); $postlist = explode("|", $mybb->get_input('posts')); foreach($postlist as $pid)
|
Zeile 2513 | Zeile 2523 |
---|
{ $posts[] = $pid; }
|
{ $posts[] = $pid; }
|
}
| }
|
if(empty($posts)) { error($lang->error_inline_nopostsselected, $lang->error); }
|
if(empty($posts)) { error($lang->error_inline_nopostsselected, $lang->error); }
|
|
|
$pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post // Select number of posts in each thread that the splitted post is in
|
$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 ");
| $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 ");
|
$pcheck = array(); while($tcheck = $db->fetch_array($query)) {
| $pcheck = array(); while($tcheck = $db->fetch_array($query)) {
|
Zeile 2567 | Zeile 2577 |
---|
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'] != '') { error($lang->error_invalidforum, $lang->error);
|
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') { 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 2592 | Zeile 2602 |
---|
// Move posts - Inline moderation case "multimoveposts": add_breadcrumb($lang->nav_multi_moveposts);
|
// Move posts - Inline moderation case "multimoveposts": add_breadcrumb($lang->nav_multi_moveposts);
|
|
|
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search');
| if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search');
|
Zeile 2612 | Zeile 2622 |
---|
error_no_permission(); } $posts = array_map('intval', $posts);
|
error_no_permission(); } $posts = array_map('intval', $posts);
|
$pidin = implode(',', $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
| // 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
|
Zeile 2666 | Zeile 2676 |
---|
clearinline($tid, 'thread'); } $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
clearinline($tid, 'thread'); } $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
| $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
eval("\$moveposts = \"".$templates->get("moderation_inline_moveposts")."\";"); output_page($moveposts); break;
|
eval("\$moveposts = \"".$templates->get("moderation_inline_moveposts")."\";"); output_page($moveposts); break;
|
|
|
// Actually split the posts - Inline moderation case "do_multimoveposts":
| // Actually split the posts - Inline moderation case "do_multimoveposts":
|
Zeile 2689 | Zeile 2702 |
---|
preg_match("#thread-([0-9]+)?#i", $mybb->input['threadurl'], $threadmatch); preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
|
preg_match("#thread-([0-9]+)?#i", $mybb->input['threadurl'], $threadmatch); preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
|
if($threadmatch[1])
| if(!empty($threadmatch[1]))
|
{ $parameters['tid'] = $threadmatch[1]; }
|
{ $parameters['tid'] = $threadmatch[1]; }
|
if($postmatch[1])
| if(!empty($postmatch[1]))
|
{ $parameters['pid'] = $postmatch[1]; }
| { $parameters['pid'] = $postmatch[1]; }
|
Zeile 3013 | Zeile 3026 |
---|
$uid = $mybb->get_input('uid', MyBB::INPUT_INT); $user = get_user($uid);
|
$uid = $mybb->get_input('uid', MyBB::INPUT_INT); $user = get_user($uid);
|
if(!$user['uid'] || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid']))
| if(!$user || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid']))
|
{ error($lang->purgespammer_invalid_user); }
| { error($lang->purgespammer_invalid_user); }
|
Zeile 3063 | Zeile 3076 |
---|
}
// Add the IP's to the banfilters
|
}
// Add the IP's to the banfilters
|
foreach(array($user['regip'], $user['lastip']) as $ip)
| if($mybb->settings['purgespammerbanip'] == 1)
|
{
|
{
|
$ip = my_inet_ntop($db->unescape_binary($ip)); $query = $db->simple_select("banfilters", "type", "type = 1 AND filter = '".$db->escape_string($ip)."'"); if($db->num_rows($query) == 0)
| foreach(array($user['regip'], $user['lastip']) as $ip)
|
{
|
{
|
$insert = array( "filter" => $db->escape_string($ip), "type" => 1, "dateline" => TIME_NOW ); $db->insert_query("banfilters", $insert);
| $ip = my_inet_ntop($db->unescape_binary($ip)); $query = $db->simple_select("banfilters", "type", "type = 1 AND filter = '".$db->escape_string($ip)."'"); if($db->num_rows($query) == 0) { $insert = array( "filter" => $db->escape_string($ip), "type" => 1, "dateline" => TIME_NOW ); $db->insert_query("banfilters", $insert); }
|
} }
// Clear the profile $userhandler->clear_profile($uid, $mybb->settings['purgespammerbangroup']);
|
} }
// Clear the profile $userhandler->clear_profile($uid, $mybb->settings['purgespammerbangroup']);
|
$cache->update_banned();
| |
$cache->update_bannedips(); $cache->update_awaitingactivation();
| $cache->update_bannedips(); $cache->update_awaitingactivation();
|
Zeile 3155 | Zeile 3170 |
---|
$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');
| $action = $mybb->get_input('action', MyBB::INPUT_INT); $modtype = htmlspecialchars_uni($mybb->get_input('modtype')); $inlinetype = htmlspecialchars_uni($mybb->get_input('inlinetype')); $searchid = htmlspecialchars_uni($mybb->get_input('searchid'));
|
$url = htmlspecialchars_uni($mybb->get_input('url')); $plugins->run_hooks('moderation_confirmation');
| $url = htmlspecialchars_uni($mybb->get_input('url')); $plugins->run_hooks('moderation_confirmation');
|
Zeile 3264 | Zeile 3279 |
---|
// Get threads which are associated with the posts $tids = array(); $options = array(
|
// Get threads which are associated with the posts $tids = array(); $options = array(
|
'order_by' => 'dateline', 'order_dir' => 'asc'
| 'order_by' => 'dateline, pid',
|
); $query = $db->simple_select("posts", "DISTINCT tid, dateline", "pid IN (".implode(',',$pids).")", $options); while($row = $db->fetch_array($query))
| ); $query = $db->simple_select("posts", "DISTINCT tid, dateline", "pid IN (".implode(',',$pids).")", $options); while($row = $db->fetch_array($query))
|