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) { $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 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(); }
|
Zeile 1374 | Zeile 1380 |
---|
if(!$hostname || $hostname == $pm['ipaddress']) { $hostname = $lang->resolve_fail;
|
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 1385 | Zeile 1391 |
---|
{ $ipaddress = $pm['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
|
{ $ipaddress = $pm['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
|
}
| }
|
$plugins->run_hooks('moderation_getpmip');
if($modal)
|
$plugins->run_hooks('moderation_getpmip');
if($modal)
|
{
| {
|
eval("\$getpmip = \"".$templates->get("moderation_getpmip_modal", 1, 0)."\";"); echo $getpmip; exit;
| eval("\$getpmip = \"".$templates->get("moderation_getpmip_modal", 1, 0)."\";"); echo $getpmip; exit;
|
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")) {
| if(!is_moderator($fid, "canmanagethreads")) {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 1489 | Zeile 1495 |
---|
elseif(!empty($parameters['tid'])) { $mergetid = (int)$parameters['tid'];
|
elseif(!empty($parameters['tid'])) { $mergetid = (int)$parameters['tid'];
|
}
| }
|
else { $mergetid = 0;
|
else { $mergetid = 0;
|
}
| }
|
$mergethread = get_thread($mergetid); if(!$mergethread) { error($lang->error_badmergeurl, $lang->error);
|
$mergethread = get_thread($mergetid); if(!$mergethread) { error($lang->error_badmergeurl, $lang->error);
|
}
| }
|
if($mergetid == $tid) { // sanity check error($lang->error_mergewithself, $lang->error);
|
if($mergetid == $tid) { // sanity check error($lang->error_mergewithself, $lang->error);
|
}
| }
|
if(!is_moderator($mergethread['fid'], "canmanagethreads")) { error_no_permission();
| if(!is_moderator($mergethread['fid'], "canmanagethreads")) { error_no_permission();
|
Zeile 1512 | Zeile 1518 |
---|
$subject = $mybb->get_input('subject'); } else
|
$subject = $mybb->get_input('subject'); } else
|
{
| {
|
$subject = $thread['subject'];
|
$subject = $thread['subject'];
|
}
$moderation->merge_threads($mergetid, $tid, $subject);
| }
$moderation->merge_threads($mergetid, $tid, $subject);
|
log_moderator_action($modlogdata, $lang->thread_merged);
| log_moderator_action($modlogdata, $lang->thread_merged);
|
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(!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 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 1613 | Zeile 1619 |
---|
if($count['totalposts'] == 1) { error($lang->error_cantsplitonepost, $lang->error);
|
if($count['totalposts'] == 1) { error($lang->error_cantsplitonepost, $lang->error);
|
}
| }
|
if($count['totalposts'] == count($mybb->input['splitpost'])) { error($lang->error_cantsplitall, $lang->error);
| if($count['totalposts'] == count($mybb->input['splitpost'])) { 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'))
| 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'); } $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) {
| } if(count($threads) < 1) {
|
Zeile 2045 | Zeile 2051 |
---|
else { clearinline($fid, 'forum');
|
else { clearinline($fid, 'forum');
|
}
| }
|
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsstuck); break;
| moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsstuck); break;
|
Zeile 2056 | Zeile 2062 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
|
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'))
| // From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))
|
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(); } }
| { 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);
|
Zeile 2087 | Zeile 2093 |
---|
else { clearinline($fid, 'forum');
|
else { clearinline($fid, 'forum');
|
}
| }
|
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunstuck); break;
| moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunstuck); break;
|
Zeile 2110 | Zeile 2116 |
---|
if(!is_moderator($fid, 'canmanagethreads')) { error_no_permission();
|
if(!is_moderator($fid, 'canmanagethreads')) { 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);
|
Zeile 2193 | Zeile 2199 |
---|
}
if(count($posts) < 1)
|
}
if(count($posts) < 1)
|
{ error($lang->error_inline_nopostsselected, $lang->error); }
| { error($lang->error_inline_nopostsselected, $lang->error); }
|
if(!is_moderator_by_pids($posts, "candeleteposts")) { error_no_permission();
| if(!is_moderator_by_pids($posts, "candeleteposts")) { error_no_permission();
|
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")) { error_no_permission();
|
if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission();
|
}
| }
|
$postlist = ""; $query = $db->query(" SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
|
$postlist = ""; $query = $db->query(" 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)) { $postdate = my_date('relative', $post['dateline']);
|
"); $altbg = "trow1"; while($post = $db->fetch_array($query)) { $postdate = my_date('relative', $post['dateline']);
|
|
|
$parser_options = array( "allow_html" => $forum['allowhtml'], "allow_mycode" => $forum['allowmycode'],
| $parser_options = array( "allow_html" => $forum['allowhtml'], "allow_mycode" => $forum['allowmycode'],
|
Zeile 2354 | Zeile 2364 |
---|
$message = $parser->parse_message($post['message'], $parser_options); eval("\$postlist .= \"".$templates->get("moderation_mergeposts_post")."\";"); $altbg = alt_trow();
|
$message = $parser->parse_message($post['message'], $parser_options); eval("\$postlist .= \"".$templates->get("moderation_mergeposts_post")."\";"); $altbg = alt_trow();
|
}
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else {
| }
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else {
|
clearinline($tid, 'thread'); }
| clearinline($tid, 'thread'); }
|
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); }
|
Zeile 2395 | Zeile 2405 |
---|
}
$masterpid = $moderation->merge_posts($postlist, $tid, $mybb->input['sep']);
|
}
$masterpid = $moderation->merge_posts($postlist, $tid, $mybb->input['sep']);
|
|
|
mark_reports($postlist, "posts"); log_moderator_action($modlogdata, $lang->merged_selective_posts); moderation_redirect(get_post_link($masterpid)."#pid$masterpid", $lang->redirect_inline_postsmerged);
| mark_reports($postlist, "posts"); log_moderator_action($modlogdata, $lang->merged_selective_posts); moderation_redirect(get_post_link($masterpid)."#pid$masterpid", $lang->redirect_inline_postsmerged);
|
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)
| 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
| $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p
|
Zeile 2466 | Zeile 2476 |
---|
{ // One or more threads do not have posts after splitting error($lang->error_cantsplitall, $lang->error);
|
{ // One or more threads do not have posts after splitting error($lang->error_cantsplitall, $lang->error);
|
}
| }
|
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') {
| $inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') {
|
Zeile 2478 | Zeile 2488 |
---|
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("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";");
| $return_url = htmlspecialchars_uni($mybb->get_input('url'));
eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";");
|
Zeile 2487 | Zeile 2497 |
---|
// Actually split the posts - Inline moderation case "do_multisplitposts":
|
// Actually split the posts - Inline moderation case "do_multisplitposts":
|
// Verify incoming POST request
| // Verify incoming POST request
|
verify_post_check($mybb->get_input('my_post_key'));
$plist = array();
| verify_post_check($mybb->get_input('my_post_key'));
$plist = array();
|
Zeile 2500 | Zeile 2510 |
---|
}
if(!is_moderator_by_pids($plist, "canmanagethreads"))
|
}
if(!is_moderator_by_pids($plist, "canmanagethreads"))
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
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)) { if((int)$tcheck['count'] <= 1)
|
"); $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1)
|
{
| {
|
error($lang->error_cantsplitonepost, $lang->error); } $pcheck[] = $tcheck['tid']; // Save tids for below
|
error($lang->error_cantsplitonepost, $lang->error); } $pcheck[] = $tcheck['tid']; // Save tids for below
|
}
| }
|
// Make sure that we are not splitting all posts in the thread // 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("
| // 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("
|
Zeile 2568 | Zeile 2578 |
---|
{ $moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); }
|
{ $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); }
|
} }
| } }
|
Zeile 3154 | 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 3263 | 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))
|