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 71 | Zeile 77 |
---|
// Get our permissions all nice and setup $permissions = forum_permissions($fid); }
|
// Get our permissions all nice and setup $permissions = forum_permissions($fid); }
|
|
|
if($pmid > 0) { $query = $db->simple_select('privatemessages', 'uid, subject, ipaddress, fromid', "pmid = $pmid");
| if($pmid > 0) { $query = $db->simple_select('privatemessages', 'uid, subject, ipaddress, fromid', "pmid = $pmid");
|
Zeile 81 | Zeile 87 |
---|
if(!$pm) { error($lang->error_invalidpm, $lang->error);
|
if(!$pm) { error($lang->error_invalidpm, $lang->error);
|
}
| }
|
}
// Get some navigation if we need it
| }
// Get some navigation if we need it
|
Zeile 202 | Zeile 208 |
---|
}
$mybb->input['tids'] = $tids;
|
}
$mybb->input['tids'] = $tids;
|
}
add_breadcrumb($lang->delayed_moderation);
| }
add_breadcrumb($lang->delayed_moderation);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
Zeile 287 | Zeile 293 |
---|
{ $mybb->input['delayedmoderation']['method'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_method;
|
{ $mybb->input['delayedmoderation']['method'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_method;
|
}
| }
|
if($mybb->input['type'] == 'move') { $newfid = (int)$mybb->input['delayedmoderation']['new_forum'];
| if($mybb->input['type'] == 'move') { $newfid = (int)$mybb->input['delayedmoderation']['new_forum'];
|
Zeile 298 | Zeile 304 |
---|
if($newperms['canview'] == 0 || !is_moderator($newfid, 'canmovetononmodforum')) { $errors[] = $lang->error_movetononmodforum;
|
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'] != '') { $errors[] = $lang->error_invalidforum;
|
$newforum = get_forum($newfid); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') { $errors[] = $lang->error_invalidforum;
|
}
| }
|
$method = $mybb->input['delayedmoderation']['method']; if($method != "copy" && $fid == $newfid)
| $method = $mybb->input['delayedmoderation']['method']; if($method != "copy" && $fid == $newfid)
|
Zeile 330 | Zeile 336 |
---|
$date_time = explode(' ', $mybb->get_input('date_time')); $date_time = explode(':', (string)$date_time[0]);
|
$date_time = explode(' ', $mybb->get_input('date_time')); $date_time = explode(':', (string)$date_time[0]);
|
|
|
if(stristr($mybb->input['date_time'], 'pm')) { $date_time[0] = 12+$date_time[0];
| if(stristr($mybb->input['date_time'], 'pm')) { $date_time[0] = 12+$date_time[0];
|
Zeile 341 | Zeile 347 |
---|
}
$rundate = gmmktime((int)$date_time[0], (int)$date_time[1], date('s', TIME_NOW), $mybb->get_input('date_month', MyBB::INPUT_INT), $mybb->get_input('date_day', MyBB::INPUT_INT), $mybb->get_input('date_year', MyBB::INPUT_INT)) - $localized_time_offset;
|
}
$rundate = gmmktime((int)$date_time[0], (int)$date_time[1], date('s', TIME_NOW), $mybb->get_input('date_month', MyBB::INPUT_INT), $mybb->get_input('date_day', MyBB::INPUT_INT), $mybb->get_input('date_year', MyBB::INPUT_INT)) - $localized_time_offset;
|
|
|
if(!$errors) { if(is_array($mybb->input['tids']))
| if(!$errors) { if(is_array($mybb->input['tids']))
|
Zeile 371 | Zeile 377 |
---|
else { if($mybb->get_input('inlinetype') == 'search')
|
else { if($mybb->get_input('inlinetype') == 'search')
|
{
| {
|
moderation_redirect(get_forum_link($fid), $lang->sprintf($lang->redirect_delayed_moderation_search, $rundate_format)); } else
| moderation_redirect(get_forum_link($fid), $lang->sprintf($lang->redirect_delayed_moderation_search, $rundate_format)); } else
|
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 493 | Zeile 499 |
---|
$where_array[] = "CONCAT(',',d.tids,',') LIKE '%,".$db->escape_string($like).",%'"; } $where_statement = implode(" OR ", $where_array);
|
$where_array[] = "CONCAT(',',d.tids,',') LIKE '%,".$db->escape_string($like).",%'"; } $where_statement = implode(" OR ", $where_array);
|
}
| }
|
$query = $db->query(" SELECT d.*, u.username, f.name AS fname FROM ".TABLE_PREFIX."delayedmoderation d
| $query = $db->query(" SELECT d.*, u.username, f.name AS fname FROM ".TABLE_PREFIX."delayedmoderation d
|
Zeile 503 | Zeile 509 |
---|
ORDER BY d.dateline DESC LIMIT 0, 20 ");
|
ORDER BY d.dateline DESC LIMIT 0, 20 ");
|
}
| }
|
else { switch($db->type) { case "pgsql": case "sqlite":
|
else { switch($db->type) { case "pgsql": case "sqlite":
|
$query = $db->query(" SELECT d.*, u.username, f.name AS fname FROM ".TABLE_PREFIX."delayedmoderation d LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid)
| $query = $db->query(" SELECT d.*, u.username, f.name AS fname FROM ".TABLE_PREFIX."delayedmoderation d 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."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: $query = $db->query("
| break; default: $query = $db->query("
|
Zeile 534 | Zeile 540 |
---|
}
while($delayedmod = $db->fetch_array($query))
|
}
while($delayedmod = $db->fetch_array($query))
|
{
| {
|
$delayedmod['dateline'] = my_date('normal', $delayedmod['delaydateline'], "", 2); $delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']);
| $delayedmod['dateline'] = my_date('normal', $delayedmod['delaydateline'], "", 2); $delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']);
|
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) {
| if($thread['closed'] == 1) {
|
Zeile 862 | Zeile 868 |
---|
// Delete the actual poll here! case "do_deletepoll":
|
// Delete the actual poll here! case "do_deletepoll":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
if(!isset($mybb->input['delete'])) {
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
if(!isset($mybb->input['delete'])) {
|
error($lang->redirect_pollnotdeleted); } if(!is_moderator($fid, "canmanagepolls"))
|
error($lang->redirect_pollnotdeleted); } 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(); }
|
}
| }
|
$query = $db->simple_select("polls", "pid", "tid = $tid"); $poll = $db->fetch_array($query); if(!$poll)
| $query = $db->simple_select("polls", "pid", "tid = $tid"); $poll = $db->fetch_array($query); if(!$poll)
|
Zeile 901 | Zeile 907 |
---|
// 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) { error($lang->error_thread_deleted, $lang->error); }
$thread = get_thread($tid);
$plugins->run_hooks("moderation_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) { 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);
|
$moderation->approve_threads($tid, $fid);
| $moderation->approve_threads($tid, $fid);
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadapproved); break;
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadapproved); break;
|
Zeile 953 | Zeile 959 |
---|
$moderation->unapprove_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
|
$moderation->unapprove_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
|
break;
| break;
|
// Restore a thread case "restorethread":
|
// Restore a thread case "restorethread":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canrestorethreads"))
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canrestorethreads"))
|
{ error_no_permission(); } $thread = get_thread($tid);
$plugins->run_hooks("moderation_restorethread");
| { error_no_permission(); } $thread = get_thread($tid);
$plugins->run_hooks("moderation_restorethread");
|
$lang->thread_restored = $lang->sprintf($lang->thread_restored, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_restored);
|
$lang->thread_restored = $lang->sprintf($lang->thread_restored, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_restored);
|
$moderation->restore_threads($tid);
| $moderation->restore_threads($tid);
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored); break;
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored); break;
|
Zeile 982 | Zeile 988 |
---|
// 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, "cansoftdeletethreads")) { error_no_permission();
| if(!is_moderator($fid, "cansoftdeletethreads")) { error_no_permission();
|
Zeile 993 | Zeile 999 |
---|
$lang->thread_soft_deleted = $lang->sprintf($lang->thread_soft_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_soft_deleted);
|
$lang->thread_soft_deleted = $lang->sprintf($lang->thread_soft_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_soft_deleted);
|
$moderation->soft_delete_threads($tid);
| $moderation->soft_delete_threads($tid);
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadsoftdeleted); break;
// Move a thread case "move": add_breadcrumb($lang->nav_move);
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadsoftdeleted); break;
// Move a thread case "move": add_breadcrumb($lang->nav_move);
|
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);
|
}
$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;
// Let's get this thing moving! case "do_move":
|
eval("\$movethread = \"".$templates->get("moderation_move")."\";"); output_page($movethread); break;
// Let's get this thing moving! case "do_move":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
Zeile 1035 | Zeile 1041 |
---|
// 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)
| }
if($thread['visible'] == -1)
|
Zeile 1046 | Zeile 1052 |
---|
$newperms = forum_permissions($moveto); if($newperms['canview'] == 0 && !is_moderator($fid, "canmovetononmodforum"))
|
$newperms = forum_permissions($moveto); if($newperms['canview'] == 0 && !is_moderator($fid, "canmovetononmodforum"))
|
{
| {
|
error($lang->error_movetononmodforum, $lang->error); }
| error($lang->error_movetononmodforum, $lang->error); }
|
Zeile 1056 | Zeile 1062 |
---|
error($lang->error_invalidforum, $lang->error); } if($method != "copy" && $thread['fid'] == $moveto)
|
error($lang->error_invalidforum, $lang->error); } if($method != "copy" && $thread['fid'] == $moveto)
|
{
| {
|
error($lang->error_movetosameforum, $lang->error);
|
error($lang->error_movetosameforum, $lang->error);
|
}
$plugins->run_hooks('moderation_do_move');
| }
$plugins->run_hooks('moderation_do_move');
|
$expire = 0; if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0) {
| $expire = 0; if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0) {
|
Zeile 1076 | Zeile 1082 |
---|
{ case "copy": log_moderator_action($modlogdata, $lang->thread_copied);
|
{ case "copy": log_moderator_action($modlogdata, $lang->thread_copied);
|
break;
| break;
|
default: case "move": case "redirect":
| default: case "move": case "redirect":
|
Zeile 1199 | Zeile 1205 |
---|
$trow = alt_trow(1); switch($db->type)
|
$trow = alt_trow(1); switch($db->type)
|
{
| {
|
case "pgsql": case "sqlite":
|
case "pgsql": case "sqlite":
|
$query = $db->query(" SELECT d.*, u.username, f.name AS fname FROM ".TABLE_PREFIX."delayedmoderation d
| $query = $db->query(" SELECT d.*, u.username, f.name AS fname FROM ".TABLE_PREFIX."delayedmoderation d
|
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 1240 | Zeile 1246 |
---|
else { eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_multiple")."\";");
|
else { eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_multiple")."\";");
|
}
| }
|
if($delayedmod['fname']) { $delayedmod['link'] = get_forum_link($delayedmod['fid']);
| if($delayedmod['fname']) { $delayedmod['link'] = get_forum_link($delayedmod['fid']);
|
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 1616 | Zeile 1622 |
---|
}
if($count['totalposts'] == count($mybb->input['splitpost']))
|
}
if($count['totalposts'] == count($mybb->input['splitpost']))
|
{
| {
|
error($lang->error_cantsplitall, $lang->error); }
| error($lang->error_cantsplitall, $lang->error); }
|
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 1877 | Zeile 1883 |
---|
$cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved); break;
|
$cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved); break;
|
|
|
// Unapprove threads - Inline moderation case "multiunapprovethreads":
| // Unapprove threads - Inline moderation case "multiunapprovethreads":
|
Zeile 1889 | Zeile 1895 |
---|
// 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
| { error_no_permission(); } } else
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads'))
| { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads'))
|
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);
log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
| $moderation->unapprove_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
|
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')) { error_no_permission(); } } else
| if(!is_moderator_by_tids($threads, 'cansoftdeletethreads')) { error_no_permission(); } } else
|
{ $threads = getids($fid, 'forum');
|
{ $threads = getids($fid, 'forum');
|
if(!is_moderator($fid, 'canstickunstickthreads'))
| if(!is_moderator($fid, 'cansoftdeletethreads')) { 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 { clearinline($fid, 'forum'); } $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadssoftdeleted); break;
// Stick threads - Inline moderation case "multistickthreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canstickunstickthreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads'))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 2041 | Zeile 2047 |
---|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else
| } else
|
{ clearinline($fid, 'forum'); }
| { clearinline($fid, 'forum'); }
|
Zeile 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 2083 | Zeile 2089 |
---|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else
| } else
|
{ clearinline($fid, 'forum'); }
| { clearinline($fid, 'forum'); }
|
Zeile 2094 | Zeile 2100 |
---|
// Move threads - Inline moderation case "multimovethreads": add_breadcrumb($lang->nav_multi_movethreads);
|
// Move threads - Inline moderation case "multimovethreads": add_breadcrumb($lang->nav_multi_movethreads);
|
|
|
if(!empty($mybb->input['searchid'])) { // From search page
| if(!empty($mybb->input['searchid'])) { // From search page
|
Zeile 2114 | Zeile 2120 |
---|
}
if(count($threads) < 1)
|
}
if(count($threads) < 1)
|
{
| {
|
error($lang->error_inline_nothreadsselected, $lang->error); } $inlineids = implode("|", $threads); if($mybb->get_input('inlinetype') == 'search')
|
error($lang->error_inline_nothreadsselected, $lang->error); } $inlineids = implode("|", $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 2134 | Zeile 2140 |
---|
// 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'));
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
Zeile 2149 | Zeile 2155 |
---|
foreach($threadlist as $tid) { $tids[] = (int)$tid;
|
foreach($threadlist as $tid) { $tids[] = (int)$tid;
|
}
| }
|
// 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($lang->error_movetononmodforum, $lang->error);
|
// 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($lang->error_movetononmodforum, $lang->error);
|
}
| }
|
$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);
|
}
| }
|
$plugins->run_hooks('moderation_do_multimovethreads');
log_moderator_action($modlogdata, $lang->multi_moved_threads);
| $plugins->run_hooks('moderation_do_multimovethreads');
log_moderator_action($modlogdata, $lang->multi_moved_threads);
|
Zeile 2182 | Zeile 2188 |
---|
// 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');
| if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search');
|
Zeile 2197 | Zeile 2203 |
---|
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);
| error_no_permission(); } $inlineids = implode("|", $posts);
|
Zeile 2206 | Zeile 2212 |
---|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
{
| {
|
clearinline($tid, 'thread');
|
clearinline($tid, 'thread');
|
}
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
| }
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
eval("\$multidelete = \"".$templates->get("moderation_inline_deleteposts")."\";"); output_page($multidelete); break;
| eval("\$multidelete = \"".$templates->get("moderation_inline_deleteposts")."\";"); output_page($multidelete); break;
|
Zeile 2221 | Zeile 2227 |
---|
// 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'));
|
|
|
$postlist = explode("|", $mybb->get_input('posts')); if(!is_moderator_by_pids($postlist, "candeleteposts")) { error_no_permission();
|
$postlist = explode("|", $mybb->get_input('posts')); if(!is_moderator_by_pids($postlist, "candeleteposts")) { error_no_permission();
|
}
| }
|
$postlist = array_map('intval', $postlist); $pids = implode(',', $postlist);
| $postlist = array_map('intval', $postlist); $pids = implode(',', $postlist);
|
Zeile 2237 | Zeile 2243 |
---|
while($threadid = $db->fetch_field($query, "tid")) { $tids[] = $threadid;
|
while($threadid = $db->fetch_field($query, "tid")) { $tids[] = $threadid;
|
} }
| } }
|
$deletecount = 0; foreach($postlist as $pid) {
| $deletecount = 0; foreach($postlist as $pid) {
|
Zeile 2356 | Zeile 2362 |
---|
$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 2404 | Zeile 2410 |
---|
// 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 2494 |
---|
// 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 2519 |
---|
{ $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 2573 |
---|
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 2598 |
---|
// 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 2618 |
---|
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 2672 |
---|
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 2698 |
---|
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 3022 |
---|
$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); }
|