Zeile 11 | Zeile 11 |
---|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'moderation.php');
|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'moderation.php');
|
$templatelist = 'changeuserbox,loginbox,moderation_delayedmoderation_custommodtool,moderation_delayedmodaction_notes,moderation_delayedmoderation_merge,moderation_delayedmoderation_move'; $templatelist .= ',moderation_delayedmoderation,moderation_deletethread,moderation_deletepoll,moderation_mergeposts_post,moderation_viewthreadnotes,moderation_confirmation'; $templatelist .= ',moderation_move,moderation_threadnotes_modaction,moderation_threadnotes_delayedmodaction,moderation_threadnotes,moderation_getip_modoptions,moderation_getip,moderation_getpmip,moderation_merge'; $templatelist .= ',moderation_split_post,moderation_split,moderation_inline_deletethreads,moderation_inline_movethreads,moderation_inline_deleteposts,moderation_inline_mergeposts,moderation_threadnotes_modaction_error'; $templatelist .= ',moderation_inline_splitposts,forumjump_bit,forumjump_special,forumjump_advanced,forumdisplay_password_wrongpass,forumdisplay_password,moderation_inline_moveposts,moderation_delayedmodaction_error,moderation_purgespammer,moderation_delayedmoderation_date_day,moderation_delayedmoderation_date_month';
| $templatelist = "changeuserbox,loginbox,moderation_delayedmoderation_custommodtool,moderation_delayedmodaction_notes,moderation_delayedmoderation_merge,moderation_delayedmoderation_move"; $templatelist .= ",moderation_delayedmoderation,moderation_deletethread,moderation_deletepoll,moderation_mergeposts_post,moderation_viewthreadnotes,moderation_confirmation,moderation_purgespammer"; $templatelist .= ",moderation_move,moderation_threadnotes_modaction,moderation_threadnotes_delayedmodaction,moderation_threadnotes,moderation_getip_modoptions,moderation_getip,moderation_getpmip"; $templatelist .= ",moderation_split_post,moderation_inline_deletethreads,moderation_inline_movethreads,moderation_inline_deleteposts,moderation_inline_mergeposts,moderation_threadnotes_modaction_error"; $templatelist .= ",moderation_inline_splitposts,forumjump_special,forumjump_advanced,forumdisplay_password_wrongpass,forumdisplay_password,moderation_inline_moveposts,moderation_delayedmodaction_error"; $templatelist .= ",moderation_delayedmodaction_notes_thread_single,moderation_delayedmodaction_notes_thread_multiple,moderation_delayedmodaction_notes_forum,moderation_delayedmodaction_notes_new_forum"; $templatelist .= ",moderation_delayedmodaction_notes_redirect,moderation_delayedmodaction_notes_merge,moderation_delayedmoderation_thread,moderation_threadnotes_modaction_thread,forumjump_bit"; $templatelist .= ",moderation_delayedmoderation_date_day,moderation_delayedmoderation_date_month,moderation_threadnotes_modaction_post,moderation_merge,moderation_split,moderation_threadnotes_modaction_forum";
|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
| require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
|
Zeile 105 | Zeile 108 |
---|
check_forum_password($forum['fid']); }
|
check_forum_password($forum['fid']); }
|
| $mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']);
|
eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");
$allowable_moderation_actions = array("getip", "getpmip", "cancel_delayedmoderation", "delayedmoderation", "threadnotes", "purgespammer", "viewthreadnotes");
| eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");
$allowable_moderation_actions = array("getip", "getpmip", "cancel_delayedmoderation", "delayedmoderation", "threadnotes", "purgespammer", "viewthreadnotes");
|
Zeile 145 | Zeile 149 |
---|
case "delayedmoderation": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
case "delayedmoderation": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
| $localized_time_offset = $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
|
if(!$mybb->get_input('date_day', MyBB::INPUT_INT)) {
|
if(!$mybb->get_input('date_day', MyBB::INPUT_INT)) {
|
$mybb->input['date_day'] = date('d', TIME_NOW);
| $mybb->input['date_day'] = gmdate('d', TIME_NOW + $localized_time_offset);
|
} if(!$mybb->get_input('date_month', MyBB::INPUT_INT)) {
|
} if(!$mybb->get_input('date_month', MyBB::INPUT_INT)) {
|
$mybb->input['date_month'] = date('m', TIME_NOW);
| $mybb->input['date_month'] = gmdate('m', TIME_NOW + $localized_time_offset);
|
}
// Assume in-line moderation if TID is not set if(!empty($mybb->input['tid']))
|
}
// Assume in-line moderation if TID is not set if(!empty($mybb->input['tid']))
|
{
| {
|
$mybb->input['tids'] = $tid; } else { if($mybb->get_input('inlinetype') == 'search')
|
$mybb->input['tids'] = $tid; } else { if($mybb->get_input('inlinetype') == 'search')
|
{
| {
|
$tids = getids($mybb->get_input('searchid'), 'search'); } else
| $tids = getids($mybb->get_input('searchid'), 'search'); } else
|
Zeile 177 | Zeile 183 |
---|
}
$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 192 | Zeile 198 |
---|
$allowed_types = array('openclosethread', 'softdeleterestorethread', 'deletethread', 'move', 'stick', 'merge', 'removeredirects', 'removesubscriptions', 'approveunapprovethread');
$mybb->input['type'] = $mybb->get_input('type');
|
$allowed_types = array('openclosethread', 'softdeleterestorethread', 'deletethread', 'move', 'stick', 'merge', 'removeredirects', 'removesubscriptions', 'approveunapprovethread');
$mybb->input['type'] = $mybb->get_input('type');
|
switch($db->type)
| switch($db->type)
|
{ case "pgsql": case "sqlite":
| { case "pgsql": case "sqlite":
|
Zeile 205 | Zeile 211 |
---|
while($tool = $db->fetch_array($query)) { $allowed_types[] = "modtool_".$tool['tid'];
|
while($tool = $db->fetch_array($query)) { $allowed_types[] = "modtool_".$tool['tid'];
|
|
|
$tool['name'] = htmlspecialchars_uni($tool['name']);
$checked = "";
| $tool['name'] = htmlspecialchars_uni($tool['name']);
$checked = "";
|
Zeile 216 | Zeile 222 |
---|
eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";"); }
|
eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";"); }
|
|
|
$mybb->input['delayedmoderation'] = $mybb->get_input('delayedmoderation', MyBB::INPUT_ARRAY);
if($mybb->input['action'] == "do_delayedmoderation" && $mybb->request_method == "post") { if(!in_array($mybb->input['type'], $allowed_types))
|
$mybb->input['delayedmoderation'] = $mybb->get_input('delayedmoderation', MyBB::INPUT_ARRAY);
if($mybb->input['action'] == "do_delayedmoderation" && $mybb->request_method == "post") { if(!in_array($mybb->input['type'], $allowed_types))
|
{
| {
|
$mybb->input['type'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_type; }
if($mybb->input['type'] == 'move' && (!isset($mybb->input['delayedmoderation']['method']) || !in_array($mybb->input['delayedmoderation']['method'], array('move', 'redirect', 'copy'))))
|
$mybb->input['type'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_type; }
if($mybb->input['type'] == 'move' && (!isset($mybb->input['delayedmoderation']['method']) || !in_array($mybb->input['delayedmoderation']['method'], array('move', 'redirect', 'copy'))))
|
{
| {
|
$mybb->input['delayedmoderation']['method'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_method; }
| $mybb->input['delayedmoderation']['method'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_method; }
|
Zeile 239 | Zeile 245 |
---|
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') { $errors[] = $lang->error_invalidforum;
|
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') { $errors[] = $lang->error_invalidforum;
|
}
| }
|
}
if($mybb->input['date_day'] > 31 || $mybb->input['date_day'] < 1)
| }
if($mybb->input['date_day'] > 31 || $mybb->input['date_day'] < 1)
|
Zeile 252 | Zeile 258 |
---|
$errors[] = $lang->error_delayedmoderation_invalid_date_month; }
|
$errors[] = $lang->error_delayedmoderation_invalid_date_month; }
|
if($mybb->input['date_year'] < gmdate('Y', TIME_NOW))
| if($mybb->input['date_year'] < gmdate('Y', TIME_NOW + $localized_time_offset))
|
{ $errors[] = $lang->error_delayedmoderation_invalid_date_year; }
| { $errors[] = $lang->error_delayedmoderation_invalid_date_year; }
|
Zeile 269 | Zeile 275 |
---|
} }
|
} }
|
$rundate = mktime((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));
| $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(!$errors) {
|
Zeile 334 | Zeile 340 |
---|
$mybb->input['delayedmoderation']['new_forum'] = (int)$mybb->input['delayedmoderation']['new_forum']; $mybb->input['delayedmoderation']['subject'] = htmlspecialchars_uni($mybb->input['delayedmoderation']['subject']); $mybb->input['delayedmoderation']['threadurl'] = htmlspecialchars_uni($mybb->input['delayedmoderation']['threadurl']);
|
$mybb->input['delayedmoderation']['new_forum'] = (int)$mybb->input['delayedmoderation']['new_forum']; $mybb->input['delayedmoderation']['subject'] = htmlspecialchars_uni($mybb->input['delayedmoderation']['subject']); $mybb->input['delayedmoderation']['threadurl'] = htmlspecialchars_uni($mybb->input['delayedmoderation']['threadurl']);
|
|
|
$forumselect = build_forum_jump("", $mybb->input['delayedmoderation']['new_forum'], 1, '', 0, true, '', "delayedmoderation[new_forum]"); } }
| $forumselect = build_forum_jump("", $mybb->input['delayedmoderation']['new_forum'], 1, '', 0, true, '', "delayedmoderation[new_forum]"); } }
|
Zeile 461 | Zeile 467 |
---|
"); } }
|
"); } }
|
|
|
while($delayedmod = $db->fetch_array($query)) {
|
while($delayedmod = $db->fetch_array($query)) {
|
$delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);
| $delayedmod['dateline'] = my_date("jS M Y, {$mybb->settings['timeformat']}", $delayedmod['delaydateline']); $delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']);
|
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']]; $info = ''; if(strpos($delayedmod['tids'], ',') === false) { $delayed_thread = get_thread($delayedmod['tids']);
|
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']]; $info = ''; if(strpos($delayedmod['tids'], ',') === false) { $delayed_thread = get_thread($delayedmod['tids']);
|
$info .= "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($delayedmod['tids'])."\">".htmlspecialchars_uni($delayed_thread['subject'])."</a><br />"; }
| $delayed_thread['link'] = get_thread_link($delayed_thread['tid']); $delayed_thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($delayed_thread['subject'])); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_single")."\";"); }
|
else
|
else
|
{ $info .= "<strong>{$lang->thread}</strong> {$lang->multiple_threads}<br />"; }
| { eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_multiple")."\";"); }
|
if($delayedmod['fname']) {
|
if($delayedmod['fname']) {
|
$info .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($delayedmod['fid'])."\">".htmlspecialchars_uni($delayedmod['fname'])."</a><br />";
| $delayedmod['link'] = get_forum_link($delayedmod['fid']); $delayedmod['fname'] = htmlspecialchars_uni($delayedmod['fname']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_forum")."\";");
|
} $delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);
if($delayedmod['type'] == 'move') {
|
} $delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);
if($delayedmod['type'] == 'move') {
|
$info .= "<strong>{$lang->new_forum}</strong> <a href=\"".get_forum_link($delayedmod['inputs']['new_forum'])."\">".htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name'])."</a><br />";
| $delayedmod['link'] = get_forum_link($delayedmod['inputs']['new_forum']); $delayedmod['name'] = htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_new_forum")."\";");
|
if($delayedmod['inputs']['method'] == "redirect") { if((int)$delayedmod['inputs']['redirect_expire'] == 0)
| if($delayedmod['inputs']['method'] == "redirect") { if((int)$delayedmod['inputs']['redirect_expire'] == 0)
|
Zeile 496 | Zeile 511 |
---|
{ $redirect_expire_bit = (int)$delayedmod['inputs']['redirect_expire']." {$lang->days}"; }
|
{ $redirect_expire_bit = (int)$delayedmod['inputs']['redirect_expire']." {$lang->days}"; }
|
$info .= "<strong>{$lang->leave_redirect_for}</strong> {$redirect_expire_bit}<br />";
| eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";");
|
} } else if($delayedmod['type'] == 'merge') {
|
} } else if($delayedmod['type'] == 'merge') {
|
$info .= "<strong>{$lang->new_subject}</strong> ".htmlspecialchars_uni($delayedmod['inputs']['subject'])."<br />"; $info .= "<strong>{$lang->thread_to_merge_with}</strong> <a href=\"".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."\">".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."</a><br />";
| $delayedmod['subject'] = htmlspecialchars_uni($delayedmod['inputs']['subject']); $delayedmod['threadurl'] = htmlspecialchars_uni($delayedmod['inputs']['threadurl']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_merge")."\";");
|
}
|
}
|
|
|
eval("\$delayedmods .= \"".$templates->get("moderation_delayedmodaction_notes")."\";"); $trow = alt_trow(); }
| eval("\$delayedmods .= \"".$templates->get("moderation_delayedmodaction_notes")."\";"); $trow = alt_trow(); }
|
Zeile 516 | Zeile 533 |
---|
$url = ''; if($mybb->get_input('tid', MyBB::INPUT_INT))
|
$url = ''; if($mybb->get_input('tid', MyBB::INPUT_INT))
|
{
| {
|
$lang->threads = $lang->thread;
|
$lang->threads = $lang->thread;
|
$threads = "<a href=\"".get_thread_link($tid)."\">{$thread['subject']}</a>";
| $thread['link'] = get_thread_link($tid); eval("\$threads = \"".$templates->get("moderation_delayedmoderation_thread")."\";");
|
eval("\$moderation_delayedmoderation_merge = \"".$templates->get("moderation_delayedmoderation_merge")."\";"); } else
| eval("\$moderation_delayedmoderation_merge = \"".$templates->get("moderation_delayedmoderation_merge")."\";"); } else
|
Zeile 526 | Zeile 544 |
---|
if($mybb->get_input('inlinetype') == 'search') { $tids = getids($mybb->get_input('searchid'), 'search');
|
if($mybb->get_input('inlinetype') == 'search') { $tids = getids($mybb->get_input('searchid'), 'search');
|
$url = htmlspecialchars_uni($mybb->get_input('url')); } else
| $url = htmlspecialchars_uni($mybb->get_input('url')); } else
|
{ $tids = getids($fid, "forum"); }
| { $tids = getids($fid, "forum"); }
|
Zeile 568 | Zeile 586 |
---|
eval('$datemonth = "'.$templates->get('moderation_delayedmoderation_date_month').'";');
|
eval('$datemonth = "'.$templates->get('moderation_delayedmoderation_date_month').'";');
|
$dateyear = gmdate('Y', TIME_NOW); $datetime = gmdate('g:i a', TIME_NOW);
| $dateyear = gmdate('Y', TIME_NOW + $localized_time_offset); $datetime = gmdate($mybb->settings['timeformat'], TIME_NOW + $localized_time_offset);
|
$plugins->run_hooks("moderation_delayedmoderation");
| $plugins->run_hooks("moderation_delayedmoderation");
|
Zeile 659 | Zeile 677 |
---|
// Delete thread confirmation page case "deletethread":
|
// Delete thread confirmation page case "deletethread":
|
add_breadcrumb($lang->nav_deletethread);
if(!is_moderator($fid, "candeletethreads")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
| add_breadcrumb($lang->nav_deletethread);
if(!is_moderator($fid, "candeletethreads")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
|
}
$plugins->run_hooks("moderation_deletethread");
| }
$plugins->run_hooks("moderation_deletethread");
|
Zeile 708 | Zeile 726 |
---|
// Delete the poll from a thread confirmation page case "deletepoll": add_breadcrumb($lang->nav_deletepoll);
|
// Delete the poll from a thread confirmation page case "deletepoll": add_breadcrumb($lang->nav_deletepoll);
|
if(!is_moderator($fid, "canmanagepolls")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission();
| if(!is_moderator($fid, "canmanagepolls")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission();
|
} }
| } }
|
Zeile 806 | Zeile 824 |
---|
$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":
|
Zeile 899 | Zeile 917 |
---|
if($method != "copy" && $thread['fid'] == $moveto) { error($lang->error_movetosameforum);
|
if($method != "copy" && $thread['fid'] == $moveto) { error($lang->error_movetosameforum);
|
}
$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 = TIME_NOW + ($mybb->get_input('redirect_expire', MyBB::INPUT_INT) * 86400);
|
$expire = 0; if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0) { $expire = TIME_NOW + ($mybb->get_input('redirect_expire', MyBB::INPUT_INT) * 86400);
|
}
| }
|
$the_thread = $tid;
|
$the_thread = $tid;
|
|
|
$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);
switch($method)
|
$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);
switch($method)
|
{
| {
|
case "copy": log_moderator_action($modlogdata, $lang->thread_copied); break;
| case "copy": log_moderator_action($modlogdata, $lang->thread_copied); break;
|
Zeile 944 | Zeile 962 |
---|
$plugins->run_hooks('moderation_viewthreadnotes');
$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $thread['subject']);
|
$plugins->run_hooks('moderation_viewthreadnotes');
$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $thread['subject']);
|
|
|
$thread['notes'] = nl2br(htmlspecialchars_uni($thread['notes']));
eval("\$viewthreadnotes = \"".$templates->get("moderation_viewthreadnotes", 1, 0)."\";"); echo $viewthreadnotes;
|
$thread['notes'] = nl2br(htmlspecialchars_uni($thread['notes']));
eval("\$viewthreadnotes = \"".$templates->get("moderation_viewthreadnotes", 1, 0)."\";"); echo $viewthreadnotes;
|
break;
| break;
|
// Thread notes editor case "threadnotes": add_breadcrumb($lang->nav_threadnotes); if(!is_moderator($fid, "canmanagethreads"))
|
// Thread notes editor case "threadnotes": add_breadcrumb($lang->nav_threadnotes); if(!is_moderator($fid, "canmanagethreads"))
|
{
| {
|
error_no_permission(); } $thread['notes'] = htmlspecialchars_uni($parser->parse_badwords($thread['notes']));
| error_no_permission(); } $thread['notes'] = htmlspecialchars_uni($parser->parse_badwords($thread['notes']));
|
Zeile 978 | Zeile 996 |
---|
while($modaction = $db->fetch_array($query)) { $modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);
|
while($modaction = $db->fetch_array($query)) { $modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);
|
| $modaction['username'] = htmlspecialchars_uni($modaction['username']);
|
$modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']); $modaction['action'] = htmlspecialchars_uni($modaction['action']); $info = ''; if($modaction['tsubject']) {
|
$modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']); $modaction['action'] = htmlspecialchars_uni($modaction['action']); $info = ''; if($modaction['tsubject']) {
|
$info .= "<strong>$lang->thread</strong> <a href=\"".get_thread_link($modaction['tid'])."\">".htmlspecialchars_uni($modaction['tsubject'])."</a><br />";
| $modaction['tsubject'] = htmlspecialchars_uni($parser->parse_badwords($modaction['tsubject'])); $modaction['threadlink'] = get_thread_link($modaction['tid']); eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_thread")."\";");
|
} if($modaction['fname']) {
|
} if($modaction['fname']) {
|
$info .= "<strong>$lang->forum</strong> <a href=\"".get_forum_link($modaction['fid'])."\">".htmlspecialchars_uni($modaction['fname'])."</a><br />";
| $modaction['fname'] = htmlspecialchars_uni($modaction['fname']); $modaction['forumlink'] = get_forum_link($modaction['fid']); eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_forum")."\";");
|
} if($modaction['psubject']) {
|
} if($modaction['psubject']) {
|
$info .= "<strong>$lang->post</strong> <a href=\"".get_post_link($modaction['pid'])."#pid".$modaction['pid']."\">".htmlspecialchars_uni($modaction['psubject'])."</a>";
| $modaction['psubject'] = htmlspecialchars_uni($parser->parse_badwords($modaction['psubject'])); $modaction['postlink'] = get_post_link($modaction['pid']); eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_post")."\";");
|
}
eval("\$modactions .= \"".$templates->get("moderation_threadnotes_modaction")."\";"); $trow = alt_trow(); } if(!$modactions)
|
}
eval("\$modactions .= \"".$templates->get("moderation_threadnotes_modaction")."\";"); $trow = alt_trow(); } if(!$modactions)
|
{
| {
|
eval("\$modactions = \"".$templates->get("moderation_threadnotes_modaction_error")."\";"); } }
| eval("\$modactions = \"".$templates->get("moderation_threadnotes_modaction_error")."\";"); } }
|
Zeile 1060 | Zeile 1086 |
---|
while($delayedmod = $db->fetch_array($query)) { $delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);
|
while($delayedmod = $db->fetch_array($query)) { $delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);
|
| $delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']);
|
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']]; $info = ''; if(strpos($delayedmod['tids'], ',') === false) {
|
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']]; $info = ''; if(strpos($delayedmod['tids'], ',') === false) {
|
$info .= "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($delayedmod['tids'])."\">{$thread['subject']}</a><br />";
| $delayed_thread['link'] = get_thread_link($delayedmod['tids']); $delayed_thread['subject'] = htmlspecialchars_uni($thread['subject']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_single")."\";");
|
} else {
|
} else {
|
$info .= "<strong>{$lang->thread}</strong> {$lang->multiple_threads}<br />";
| eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_multiple")."\";");
|
}
if($delayedmod['fname']) {
|
}
if($delayedmod['fname']) {
|
$info .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($delayedmod['fid'])."\">".htmlspecialchars_uni($delayedmod['fname'])."</a><br />";
| $delayedmod['link'] = get_forum_link($delayedmod['fid']); $delayedmod['fname'] = htmlspecialchars_uni($delayedmod['fname']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_forum")."\";");
|
} $delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);
if($delayedmod['type'] == 'move') {
|
} $delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);
if($delayedmod['type'] == 'move') {
|
$info .= "<strong>{$lang->new_forum}</strong> <a href=\"".get_forum_link($delayedmod['inputs']['new_forum'])."\">".htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name'])."</a><br />";
| $delayedmod['link'] = get_forum_link($delayedmod['inputs']['new_forum']); $delayedmod['name'] = htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_new_forum")."\";");
|
if($delayedmod['inputs']['method'] == "redirect") {
|
if($delayedmod['inputs']['method'] == "redirect") {
|
$info .= "<strong>{$lang->leave_redirect_for}</strong> ".(int)$delayedmod['inputs']['redirect_expire']." {$lang->days}<br />";
| if((int)$delayedmod['inputs']['redirect_expire'] == 0) { $redirect_expire_bit = $lang->redirect_forever; } else { $redirect_expire_bit = (int)$delayedmod['inputs']['redirect_expire']." {$lang->days}"; }
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";");
|
} } else if($delayedmod['type'] == 'merge') {
|
} } else if($delayedmod['type'] == 'merge') {
|
$info .= "<strong>{$lang->new_subject}</strong> ".htmlspecialchars_uni($delayedmod['inputs']['subject'])."<br />"; $info .= "<strong>{$lang->thread_to_merge_with}</strong> <a href=\"".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."\">".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."</a><br />";
| $delayedmod['subject'] = htmlspecialchars_uni($delayedmod['inputs']['subject']); $delayedmod['threadurl'] = htmlspecialchars_uni($delayedmod['inputs']['threadurl']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_merge")."\";");
|
}
eval("\$delayedmods .= \"".$templates->get("moderation_threadnotes_delayedmodaction")."\";");
| }
eval("\$delayedmods .= \"".$templates->get("moderation_threadnotes_delayedmodaction")."\";");
|
Zeile 1139 | Zeile 1183 |
---|
$post['ipaddress'] = my_inet_ntop($db->unescape_binary($post['ipaddress'])); $hostname = @gethostbyaddr($post['ipaddress']); if(!$hostname || $hostname == $post['ipaddress'])
|
$post['ipaddress'] = my_inet_ntop($db->unescape_binary($post['ipaddress'])); $hostname = @gethostbyaddr($post['ipaddress']); if(!$hostname || $hostname == $post['ipaddress'])
|
{ $hostname = $lang->resolve_fail; }
$username = build_profile_link($post['username'], $post['uid']);
| { $hostname = $lang->resolve_fail; }
$post['username'] = htmlspecialchars_uni($post['username']); $username = build_profile_link($post['username'], $post['uid']);
|
// Moderator options $modoptions = ""; if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canuseipsearch'] == 1) { $ipaddress = $post['ipaddress'];
|
// Moderator options $modoptions = ""; if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canuseipsearch'] == 1) { $ipaddress = $post['ipaddress'];
|
eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
| eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
|
}
$plugins->run_hooks('moderation_getip');
| }
$plugins->run_hooks('moderation_getip');
|
Zeile 1162 | Zeile 1207 |
---|
// Let's look up the ip address of a PM case "getpmip": if($pmid <= 0)
|
// Let's look up the ip address of a PM case "getpmip": if($pmid <= 0)
|
{
| {
|
error($lang->error_invalidpm); } add_breadcrumb($lang->nav_pms, "private.php");
| error($lang->error_invalidpm); } add_breadcrumb($lang->nav_pms, "private.php");
|
Zeile 1180 | Zeile 1225 |
---|
{ $hostname = $lang->resolve_fail; }
|
{ $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 1190 | Zeile 1235 |
---|
{ $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');
eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";"); output_page($getpmip);
|
$plugins->run_hooks('moderation_getpmip');
eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";"); output_page($getpmip);
|
break;
| break;
|
// Merge threads case "merge": add_breadcrumb($lang->nav_merge);
|
// Merge threads case "merge": add_breadcrumb($lang->nav_merge);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
}
$plugins->run_hooks("moderation_merge");
| }
$plugins->run_hooks("moderation_merge");
|
Zeile 1214 | Zeile 1259 |
---|
// Let's get those threads together baby! (Merge threads) case "do_merge":
|
// Let's get those threads together baby! (Merge threads) case "do_merge":
|
|
|
// 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 1237 | Zeile 1282 |
---|
preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
if($threadmatch[1])
|
preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
if($threadmatch[1])
|
{
| {
|
$parameters['tid'] = $threadmatch[1]; }
if($postmatch[1])
|
$parameters['tid'] = $threadmatch[1]; }
if($postmatch[1])
|
{
| {
|
$parameters['pid'] = $postmatch[1];
|
$parameters['pid'] = $postmatch[1];
|
} } else {
| } } else {
|
// Get thread to merge's tid the normal way $splitloc = explode(".php", $mybb->input['threadurl']); $temp = explode("&", my_substr($splitloc[1], 1));
if(!empty($temp))
|
// Get thread to merge's tid the normal way $splitloc = explode(".php", $mybb->input['threadurl']); $temp = explode("&", my_substr($splitloc[1], 1));
if(!empty($temp))
|
{
| {
|
for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2);
| for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2);
|
Zeile 1275 | Zeile 1320 |
---|
elseif(!empty($parameters['tid'])) { $mergetid = (int)$parameters['tid'];
|
elseif(!empty($parameters['tid'])) { $mergetid = (int)$parameters['tid'];
|
}
| }
|
else
|
else
|
{
| {
|
$mergetid = 0; } $mergethread = get_thread($mergetid);
|
$mergetid = 0; } $mergethread = get_thread($mergetid);
|
if(!$mergethread) { error($lang->error_badmergeurl);
| if(!$mergethread) { error($lang->error_badmergeurl);
|
} if($mergetid == $tid) { // sanity check
| } if($mergetid == $tid) { // sanity check
|
Zeile 1294 | Zeile 1339 |
---|
error_no_permission(); } if(isset($mybb->input['subject']))
|
error_no_permission(); } if(isset($mybb->input['subject']))
|
{
| {
|
$subject = $mybb->get_input('subject'); } else
| $subject = $mybb->get_input('subject'); } else
|
Zeile 1325 | Zeile 1370 |
---|
"); $numposts = $db->num_rows($query); if($numposts <= 1)
|
"); $numposts = $db->num_rows($query); if($numposts <= 1)
|
{ error($lang->error_cantsplitonepost); }
| { error($lang->error_cantsplitonepost); }
|
$altbg = "trow1"; $posts = ''; while($post = $db->fetch_array($query)) { $postdate = my_date('relative', $post['dateline']);
|
$altbg = "trow1"; $posts = ''; while($post = $db->fetch_array($query)) { $postdate = my_date('relative', $post['dateline']);
|
| $post['username'] = htmlspecialchars_uni($post['username']);
|
$parser_options = array( "allow_html" => $forum['allowhtml'],
| $parser_options = array( "allow_html" => $forum['allowhtml'],
|
Zeile 1451 | Zeile 1497 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'candeletethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'candeletethreads'))
|
{ error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'candeletethreads')) { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
| { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'candeletethreads')) { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
}
$inlineids = implode("|", $threads);
| }
$inlineids = implode("|", $threads);
|
Zeile 1556 | Zeile 1602 |
---|
break;
// Close threads - Inline moderation
|
break;
// Close threads - Inline moderation
|
case "multiclosethreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
| case "multiclosethreads":
// 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'))
|
{ // From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
|
{ error_no_permission(); } } else {
| { error_no_permission(); } } else {
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads')) {
| $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads')) {
|
Zeile 1581 | Zeile 1627 |
---|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
}
| }
|
$moderation->close_threads($threads);
log_moderator_action($modlogdata, $lang->multi_closed_threads); if($mybb->get_input('inlinetype') == 'search')
|
$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
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
Zeile 1598 | Zeile 1644 |
---|
break;
// Approve threads - Inline moderation
|
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(); }
| 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');
|
} else { $threads = getids($fid, 'forum');
|
if(!is_moderator($fid, 'canapproveunapprovethreads')) {
| if(!is_moderator($fid, 'canapproveunapprovethreads')) {
|
error_no_permission(); } }
| error_no_permission(); } }
|
Zeile 1631 | Zeile 1677 |
---|
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'); } $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved); break;
|
clearinline($fid, 'forum'); } $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 1654 | Zeile 1700 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
} else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads')) { error_no_permission(); } }
| } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads')) { error_no_permission(); } }
|
if(count($threads) < 1)
|
if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected); }
|
$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 1685 | Zeile 1731 |
---|
// Restore threads - Inline moderation case "multirestorethreads":
|
// Restore threads - Inline moderation case "multirestorethreads":
|
|
|
// 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 1702 | Zeile 1748 |
---|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canrestorethreads'))
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canrestorethreads'))
|
{
| {
|
error_no_permission(); } } if(count($threads) < 1)
|
error_no_permission(); } } if(count($threads) < 1)
|
{
| {
|
error($lang->error_inline_nothreadsselected); }
|
error($lang->error_inline_nothreadsselected); }
|
|
|
$moderation->restore_threads($threads);
|
$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');
|
log_moderator_action($modlogdata, $lang->multi_restored_threads); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else
| } else
|
{ clearinline($fid, 'forum'); }
| { clearinline($fid, 'forum'); }
|
Zeile 1728 | Zeile 1774 |
---|
// Soft delete threads - Inline moderation case "multisoftdeletethreads":
|
// 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 1737 | Zeile 1783 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'cansoftdeletethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'cansoftdeletethreads'))
|
{ error_no_permission(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'cansoftdeletethreads'))
|
else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'cansoftdeletethreads'))
|
{ error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
| { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
}
$moderation->soft_delete_threads($threads);
log_moderator_action($modlogdata, $lang->multi_soft_deleted_threads);
|
}
$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'); }
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); }
|
else { clearinline($fid, 'forum');
| else { clearinline($fid, 'forum');
|
Zeile 1770 | Zeile 1816 |
---|
break;
// Stick threads - Inline moderation
|
break;
// Stick threads - Inline moderation
|
case "multistickthreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canstickunstickthreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads')) { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
| case "multistickthreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canstickunstickthreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads')) { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
|
$moderation->stick_threads($threads);
| $moderation->stick_threads($threads);
|
Zeile 1933 | Zeile 1979 |
---|
// 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')
| if($mybb->get_input('inlinetype') == 'search')
|
{ $posts = getids($mybb->get_input('searchid'), 'search'); }
| { $posts = getids($mybb->get_input('searchid'), 'search'); }
|
Zeile 2025 | Zeile 2071 |
---|
{ mark_reports($plist, "posts"); $url = get_thread_link($thread['tid']);
|
{ mark_reports($plist, "posts"); $url = get_thread_link($thread['tid']);
|
} }
| } }
|
$lang->deleted_selective_posts = $lang->sprintf($lang->deleted_selective_posts, $deletecount); log_moderator_action($modlogdata, $lang->deleted_selective_posts); moderation_redirect($url, $lang->redirect_postsdeleted); break;
|
$lang->deleted_selective_posts = $lang->sprintf($lang->deleted_selective_posts, $deletecount); log_moderator_action($modlogdata, $lang->deleted_selective_posts); moderation_redirect($url, $lang->redirect_postsdeleted); break;
|
|
|
// Merge posts - Inline moderation case "multimergeposts": add_breadcrumb($lang->nav_multi_mergeposts);
|
// Merge posts - Inline moderation case "multimergeposts": add_breadcrumb($lang->nav_multi_mergeposts);
|
|
|
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search');
| if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search');
|
Zeile 2044 | Zeile 2090 |
---|
else { $posts = getids($tid, 'thread');
|
else { $posts = getids($tid, 'thread');
|
}
| }
|
// Add the selected posts from other threads foreach($mybb->cookies as $key => $value) {
| // Add the selected posts from other threads foreach($mybb->cookies as $key => $value) {
|
Zeile 2063 | Zeile 2109 |
---|
} // Remove the cookie once its data is retrieved my_unsetcookie($key);
|
} // Remove the cookie once its data is retrieved my_unsetcookie($key);
|
} }
if(empty($posts)) { error($lang->error_inline_nopostsselected);
| } }
if(empty($posts)) { error($lang->error_inline_nopostsselected);
|
}
if(!is_moderator_by_pids($posts, "canmanagethreads"))
| }
if(!is_moderator_by_pids($posts, "canmanagethreads"))
|
Zeile 2105 | Zeile 2151 |
---|
$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') {
| }
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread');
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread');
|
}
| }
|
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
| $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
Zeile 2125 | Zeile 2171 |
---|
// Actually merge the posts - Inline moderation case "do_multimergeposts":
|
// Actually merge the posts - Inline moderation case "do_multimergeposts":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
Zeile 2136 | Zeile 2182 |
---|
}
foreach($mergepost as $pid => $yes)
|
}
foreach($mergepost as $pid => $yes)
|
{
| {
|
$postlist[] = (int)$pid; }
| $postlist[] = (int)$pid; }
|
Zeile 2150 | Zeile 2196 |
---|
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);
|
break;
| break;
|
// Split posts - Inline moderation case "multisplitposts": add_breadcrumb($lang->nav_multi_splitposts);
|
// Split posts - Inline moderation case "multisplitposts": add_breadcrumb($lang->nav_multi_splitposts);
|
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); }
if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission(); } $posts = array_map('intval', $posts); $pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post // Select number of posts in each thread that the splitted post is in $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid "); $threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost); } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below
| if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); }
if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission(); } $posts = array_map('intval', $posts); $pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post // Select number of posts in each thread that the splitted post is in $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid "); $threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost); } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below
|
}
// Make sure that we are not splitting all posts in the thread
| }
// Make sure that we are not splitting all posts in the thread
|
Zeile 2275 | Zeile 2321 |
---|
// 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
|
// 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)
| $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();
|
WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid "); $pcheck = array();
|
while($tcheck = $db->fetch_array($query)) {
| while($tcheck = $db->fetch_array($query)) {
|
if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost);
| if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost);
|
Zeile 2310 | Zeile 2356 |
---|
} } if(count($pcheck2) != count($pcheck))
|
} } if(count($pcheck2) != count($pcheck))
|
{
| {
|
// One or more threads do not have posts after splitting error($lang->error_cantsplitall); }
| // One or more threads do not have posts after splitting error($lang->error_cantsplitall); }
|
Zeile 2318 | Zeile 2364 |
---|
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 {
| } else {
|
$moveto = $fid; }
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
$moveto = $fid; }
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
{
| {
|
error($lang->error_invalidforum); }
| error($lang->error_invalidforum); }
|
Zeile 2336 | Zeile 2382 |
---|
$pid_list = implode(', ', $posts); $lang->split_selective_posts = $lang->sprintf($lang->split_selective_posts, $pid_list, $newtid); log_moderator_action($modlogdata, $lang->split_selective_posts);
|
$pid_list = implode(', ', $posts); $lang->split_selective_posts = $lang->sprintf($lang->split_selective_posts, $pid_list, $newtid); log_moderator_action($modlogdata, $lang->split_selective_posts);
|
|
|
moderation_redirect(get_thread_link($newtid), $lang->redirect_threadsplit); break;
| moderation_redirect(get_thread_link($newtid), $lang->redirect_threadsplit); break;
|
Zeile 2347 | Zeile 2393 |
---|
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');
|
}
| }
|
else { $posts = getids($tid, 'thread');
|
else { $posts = getids($tid, 'thread');
|
}
| }
|
if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
}
| }
|
if(!is_moderator_by_pids($posts, "canmanagethreads"))
|
if(!is_moderator_by_pids($posts, "canmanagethreads"))
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
| }
|
$posts = array_map('intval', $posts);
|
$posts = array_map('intval', $posts);
|
$pidin = implode(',', $posts);
// Make sure that we are not moving posts in a thread with one post // Select number of posts in each thread that the moved post is in $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid "); $threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost); } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
// Make sure that we are not moving all posts in the thread // The query does not return a row when the count is 0, so find if some threads are missing (i.e. 0 posts after removal) $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) AND q.pid NOT IN ($pidin) GROUP BY p.tid, p.pid "); $pcheck2 = array(); while($tcheck = $db->fetch_array($query)) { if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid'];
| $pidin = implode(',', $posts);
// Make sure that we are not moving posts in a thread with one post // Select number of posts in each thread that the moved post is in $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid "); $threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost); } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
// Make sure that we are not moving all posts in the thread // The query does not return a row when the count is 0, so find if some threads are missing (i.e. 0 posts after removal) $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) AND q.pid NOT IN ($pidin) GROUP BY p.tid, p.pid "); $pcheck2 = array(); while($tcheck = $db->fetch_array($query)) { if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid'];
|
} } if(count($pcheck2) != count($pcheck))
| } } if(count($pcheck2) != count($pcheck))
|
Zeile 2538 | Zeile 2584 |
---|
while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1)
|
while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1)
|
{
| {
|
error($lang->error_cantsplitonepost); } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below
|
error($lang->error_cantsplitonepost); } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below
|
}
| }
|
// Make sure that we are not moving all posts in the thread // The query does not return a row when the count is 0, so find if some threads are missing (i.e. 0 posts after removal)
| // Make sure that we are not moving all posts in the thread // The query does not return a row when the count is 0, so find if some threads are missing (i.e. 0 posts after removal)
|
Zeile 2562 | Zeile 2608 |
---|
} } if(count($pcheck2) != count($pcheck))
|
} } if(count($pcheck2) != count($pcheck))
|
{
| {
|
// One or more threads do not have posts after splitting error($lang->error_cantmoveall); }
| // One or more threads do not have posts after splitting error($lang->error_cantmoveall); }
|
Zeile 2572 | Zeile 2618 |
---|
$pid_list = implode(', ', $posts); $lang->move_selective_posts = $lang->sprintf($lang->move_selective_posts, $pid_list, $newtid); log_moderator_action($modlogdata, $lang->move_selective_posts);
|
$pid_list = implode(', ', $posts); $lang->move_selective_posts = $lang->sprintf($lang->move_selective_posts, $pid_list, $newtid); log_moderator_action($modlogdata, $lang->move_selective_posts);
|
|
|
moderation_redirect(get_thread_link($newtid), $lang->redirect_moveposts); break;
|
moderation_redirect(get_thread_link($newtid), $lang->redirect_moveposts); break;
|
|
|
// Approve posts - Inline moderation case "multiapproveposts":
|
// Approve posts - Inline moderation case "multiapproveposts":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread');
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread');
|
} if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
} if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
}
if(!is_moderator_by_pids($posts, "canapproveunapproveposts")) { error_no_permission();
| }
if(!is_moderator_by_pids($posts, "canapproveunapproveposts")) { error_no_permission();
|
}
$pids = array(); foreach($posts as $pid) { $pids[] = (int)$pid;
|
}
$pids = array(); foreach($posts as $pid) { $pids[] = (int)$pid;
|
}
| }
|
$moderation->approve_posts($pids);
log_moderator_action($modlogdata, $lang->multi_approve_posts);
|
$moderation->approve_posts($pids);
log_moderator_action($modlogdata, $lang->multi_approve_posts);
|
if($mybb->get_input('inlinetype') == 'search') {
| if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
Zeile 2621 | Zeile 2667 |
---|
break;
// Unapprove posts - Inline moderation
|
break;
// Unapprove posts - Inline moderation
|
case "multiunapproveposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else {
| case "multiunapproveposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); }
if(count($posts) < 1) { error($lang->error_inline_nopostsselected); } $pids = array();
if(!is_moderator_by_pids($posts, "canapproveunapproveposts")) { error_no_permission(); } foreach($posts as $pid) { $pids[] = (int)$pid; }
$moderation->unapprove_posts($pids);
log_moderator_action($modlogdata, $lang->multi_unapprove_posts); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsunapproved); break;
// Restore posts - Inline moderation case "multirestoreposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else {
|
$posts = getids($tid, 'thread'); }
|
$posts = getids($tid, 'thread'); }
|
| |
if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
|
if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
|
$pids = array();
| |
|
|
if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))
| if(!is_moderator_by_pids($posts, "canrestoreposts"))
|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
| $pids = array();
|
foreach($posts as $pid) { $pids[] = (int)$pid;
|
foreach($posts as $pid) { $pids[] = (int)$pid;
|
}
$moderation->unapprove_posts($pids);
log_moderator_action($modlogdata, $lang->multi_unapprove_posts); if($mybb->get_input('inlinetype') == 'search') {
| }
$moderation->restore_posts($pids);
log_moderator_action($modlogdata, $lang->multi_restore_posts); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread'); }
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread'); }
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsunapproved);
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsrestored);
|
break;
|
break;
|
// Restore posts - Inline moderation case "multirestoreposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); } if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
if(!is_moderator_by_pids($posts, "canrestoreposts")) { error_no_permission(); }
$pids = array(); foreach($posts as $pid) { $pids[] = (int)$pid; }
$moderation->restore_posts($pids);
log_moderator_action($modlogdata, $lang->multi_restore_posts); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsrestored); break;
// Soft delete posts - Inline moderation case "multisoftdeleteposts":
| // Soft delete posts - Inline moderation case "multisoftdeleteposts":
|
// 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 2725 | Zeile 2770 |
---|
if(count($posts) < 1) {
|
if(count($posts) < 1) {
|
error($lang->error_inline_nopostsselected); } $pids = array();
if(!is_moderator_by_pids($posts, "cansoftdeleteposts")) { error_no_permission(); } foreach($posts as $pid) { $pids[] = (int)$pid; }
$moderation->soft_delete_posts($pids);
log_moderator_action($modlogdata, $lang->multi_soft_delete_posts); if($mybb->get_input('inlinetype') == 'search')
| error($lang->error_inline_nopostsselected); } $pids = array();
if(!is_moderator_by_pids($posts, "cansoftdeleteposts")) { error_no_permission(); } foreach($posts as $pid) { $pids[] = (int)$pid; }
$moderation->soft_delete_posts($pids); log_moderator_action($modlogdata, $lang->multi_soft_delete_posts);
if($mybb->get_input('inlinetype') == 'search')
|
{ clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread');
|
{ clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread');
|
}
| }
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postssoftdeleted); break; case "do_purgespammer":
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postssoftdeleted); break; case "do_purgespammer":
|
Zeile 2769 | Zeile 2814 |
---|
}
if($mybb->input['action'] == "do_purgespammer")
|
}
if($mybb->input['action'] == "do_purgespammer")
|
{ verify_post_check($mybb->get_input('my_post_key'));
| { verify_post_check($mybb->get_input('my_post_key'));
|
$user_deleted = false;
| $user_deleted = false;
|
Zeile 2863 | Zeile 2908 |
---|
else if($mybb->input['action'] == "purgespammer") { $plugins->run_hooks("moderation_purgespammer_show");
|
else if($mybb->input['action'] == "purgespammer") { $plugins->run_hooks("moderation_purgespammer_show");
|
|
|
add_breadcrumb($lang->purgespammer);
|
add_breadcrumb($lang->purgespammer);
|
$lang->purgespammer_purge = $lang->sprintf($lang->purgespammer_purge, $user['username']);
| $lang->purgespammer_purge = $lang->sprintf($lang->purgespammer_purge, htmlspecialchars_uni($user['username']));
|
if($mybb->settings['purgespammerbandelete'] == "ban") { $lang->purgespammer_purge_desc = $lang->sprintf($lang->purgespammer_purge_desc, $lang->purgespammer_ban);
|
if($mybb->settings['purgespammerbandelete'] == "ban") { $lang->purgespammer_purge_desc = $lang->sprintf($lang->purgespammer_purge_desc, $lang->purgespammer_ban);
|
}
| }
|
else { $lang->purgespammer_purge_desc = $lang->sprintf($lang->purgespammer_purge_desc, $lang->purgespammer_delete);
| else { $lang->purgespammer_purge_desc = $lang->sprintf($lang->purgespammer_purge_desc, $lang->purgespammer_delete);
|
Zeile 2886 | Zeile 2931 |
---|
{ // 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'));
|
|
|
$options = my_unserialize($tool['threadoptions']);
if(!is_member($tool['groups'])) { error_no_permission();
|
$options = my_unserialize($tool['threadoptions']);
if(!is_member($tool['groups'])) { error_no_permission();
|
}
| }
|
if(!empty($options['confirmation']) && empty($mybb->input['confirm'])) {
| if(!empty($options['confirmation']) && empty($mybb->input['confirm'])) {
|
Zeile 2910 | Zeile 2955 |
---|
output_page($page); exit;
|
output_page($page); exit;
|
}
| }
|
if($tool['type'] == 't' && $mybb->get_input('modtype') == 'inlinethread') { if($mybb->get_input('inlinetype') == 'search')
| if($tool['type'] == 't' && $mybb->get_input('modtype') == 'inlinethread') { if($mybb->get_input('inlinetype') == 'search')
|
Zeile 3009 | Zeile 3054 |
---|
'order_by' => 'dateline', 'order_dir' => 'asc' );
|
'order_by' => 'dateline', 'order_dir' => 'asc' );
|
$query = $db->simple_select("posts", "DISTINCT tid", "pid IN (".implode(',',$pids).")", $options);
| $query = $db->simple_select("posts", "DISTINCT tid, dateline", "pid IN (".implode(',',$pids).")", $options);
|
while($row = $db->fetch_array($query)) { $tids[] = $row['tid'];
| while($row = $db->fetch_array($query)) { $tids[] = $row['tid'];
|
Zeile 3047 | Zeile 3092 |
---|
break; }
|
break; }
|
// Some little handy functions for our inline moderation
| /** * Some little handy functions for our inline moderation * * @param int $id * @param string $type * * @return array */
|
function getids($id, $type) { global $mybb;
| function getids($id, $type) { global $mybb;
|
Zeile 3079 | Zeile 3131 |
---|
return $newids; }
|
return $newids; }
|
| /** * @param int $id * @param string $type * * @return array */
|
function getallids($id, $type) { global $db, $mybb;
| function getallids($id, $type) { global $db, $mybb;
|
Zeile 3140 | Zeile 3198 |
---|
return $ids; }
|
return $ids; }
|
| /** * @param int $id * @param string $type */
|
function clearinline($id, $type) { my_unsetcookie("inlinemod_".$type.$id);
|
function clearinline($id, $type) { my_unsetcookie("inlinemod_".$type.$id);
|
my_unsetcookie("inlinemod_".$type.$id."_removed");
| my_unsetcookie("inlinemod_{$type}{$id}_removed");
|
}
|
}
|
| /** * @param int $id * @param string $type */
|
function extendinline($id, $type) {
|
function extendinline($id, $type) {
|
my_setcookie("inlinemod_$type$id", '', TIME_NOW+3600); my_setcookie("inlinemod_$type$id_removed", '', TIME_NOW+3600);
| my_setcookie("inlinemod_{$type}{$id}", '', TIME_NOW+3600); my_setcookie("inlinemod_{$type}{$id}_removed", '', TIME_NOW+3600);
|
}
/**
| }
/**
|
Zeile 3158 | Zeile 3224 |
---|
* Note: If no posts are specified, this function will return true. It is the * responsibility of the calling script to error-check this case if necessary. *
|
* Note: If no posts are specified, this function will return true. It is the * responsibility of the calling script to error-check this case if necessary. *
|
* @param array Array of post IDs * @param string Permission to check * @returns bool True if moderator of all; false otherwise
| * @param array $posts Array of post IDs * @param string $permission Permission to check * @return bool True if moderator of all; false otherwise
|
*/ function is_moderator_by_pids($posts, $permission='') {
| */ function is_moderator_by_pids($posts, $permission='') {
|
Zeile 3202 | Zeile 3268 |
---|
* Note: If no threads are specified, this function will return true. It is the * responsibility of the calling script to error-check this case if necessary. *
|
* Note: If no threads are specified, this function will return true. It is the * responsibility of the calling script to error-check this case if necessary. *
|
* @param array Array of thread IDs * @param string Permission to check * @returns bool True if moderator of all; false otherwise
| * @param array $threads Array of thread IDs * @param string $permission Permission to check * @return bool True if moderator of all; false otherwise
|
*/ function is_moderator_by_tids($threads, $permission='') {
| */ function is_moderator_by_tids($threads, $permission='') {
|
Zeile 3242 | Zeile 3308 |
---|
/** * Special redirect that takes a return URL into account
|
/** * Special redirect that takes a return URL into account
|
* @param string URL * @param string Message * @param string Title
| * @param string $url URL * @param string $message Message * @param string $title Title
|
*/ function moderation_redirect($url, $message="", $title="") {
| */ function moderation_redirect($url, $message="", $title="") {
|