Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: moderation.php 5138 2010-07-28 18:31:24Z RyanGordon $
| * $Id: moderation.php 5820 2012-05-01 15:15:37Z Tomm $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 126 | Zeile 126 |
---|
} else {
|
} else {
|
moderation_redirect("moderation.php?action=delayedmoderation&tid={$tid}&my_post_key={$mybb->post_code}", $lang->redirect_delayed_moderation_cancelled);
| moderation_redirect("moderation.php?action=delayedmoderation&tid={$tid}&my_post_key={$mybb->post_code}", $lang->redirect_delayed_moderation_cancelled);
|
} break; case "do_delayedmoderation":
| } break; case "do_delayedmoderation":
|
Zeile 209 | Zeile 209 |
---|
if($mybb->input['type'] == 'move') {
|
if($mybb->input['type'] == 'move') {
|
$query = $db->simple_select("forums", "*", "fid='{$fid}'"); $newforum = $db->fetch_array($query); if($newforum['type'] != 'f')
| $newforum = get_forum($fid); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
{ $errors[] = $lang->error_invalidforum; }
| { $errors[] = $lang->error_invalidforum; }
|
Zeile 919 | Zeile 918 |
---|
error_no_permission(); }
|
error_no_permission(); }
|
$query = $db->simple_select("forums", "*", "fid='$moveto'"); $newforum = $db->fetch_array($query); if($newforum['type'] != "f")
| $newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
{ error($lang->error_invalidforum);
|
{ error($lang->error_invalidforum);
|
}
| }
|
if($method != "copy" && $thread['fid'] == $moveto) { error($lang->error_movetosameforum);
| if($method != "copy" && $thread['fid'] == $moveto) { error($lang->error_movetosameforum);
|
Zeile 932 | Zeile 930 |
---|
$expire = 0; if(intval($mybb->input['redirect_expire']) > 0)
|
$expire = 0; if(intval($mybb->input['redirect_expire']) > 0)
|
{
| {
|
$expire = TIME_NOW + (intval($mybb->input['redirect_expire']) * 86400); }
|
$expire = TIME_NOW + (intval($mybb->input['redirect_expire']) * 86400); }
|
|
|
$the_thread = $tid;
$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);
| $the_thread = $tid;
$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);
|
Zeile 944 | Zeile 942 |
---|
{ case "copy": log_moderator_action($modlogdata, $lang->thread_copied);
|
{ case "copy": log_moderator_action($modlogdata, $lang->thread_copied);
|
break;
| break;
|
default: case "move": case "redirect":
| default: case "move": case "redirect":
|
Zeile 1011 | Zeile 1009 |
---|
'removesubscriptions' => $lang->remove_subscriptions, 'approveunapprovethread' => $lang->approve_unapprove_thread );
|
'removesubscriptions' => $lang->remove_subscriptions, 'approveunapprovethread' => $lang->approve_unapprove_thread );
|
switch($db->type) {
| switch($db->type) {
|
case "pgsql": case "sqlite": $query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
| case "pgsql": case "sqlite": $query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
|
Zeile 1033 | Zeile 1031 |
---|
{ case "pgsql": case "sqlite":
|
{ case "pgsql": case "sqlite":
|
$query = $db->query(" SELECT d.*, u.username, t.subject AS tsubject, f.name AS fname FROM ".TABLE_PREFIX."delayedmoderation d LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=d.tids)
| $query = $db->query(" SELECT d.*, u.username, t.subject AS tsubject, f.name AS fname FROM ".TABLE_PREFIX."delayedmoderation d LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=d.tids)
|
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid) WHERE ','||d.tids||',' LIKE '%,{$tid},%' ORDER BY d.dateline DESC
| LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid) WHERE ','||d.tids||',' LIKE '%,{$tid},%' ORDER BY d.dateline DESC
|
Zeile 1107 | Zeile 1105 |
---|
// Update the thread notes! case "do_threadnotes":
|
// Update the thread notes! case "do_threadnotes":
|
// Verify incoming POST request
| // Verify incoming POST request
|
verify_post_check($mybb->input['my_post_key']);
if(!is_moderator($fid, "canmanagethreads"))
| verify_post_check($mybb->input['my_post_key']);
if(!is_moderator($fid, "canmanagethreads"))
|
Zeile 1139 | Zeile 1137 |
---|
{ $hostname = $lang->resolve_fail; }
|
{ $hostname = $lang->resolve_fail; }
|
| $username = build_profile_link($post['username'], $post['uid']);
|
// Moderator options $modoptions = "";
| // Moderator options $modoptions = "";
|
Zeile 1146 | Zeile 1146 |
---|
{ eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";"); }
|
{ eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";"); }
|
|
|
eval("\$getip = \"".$templates->get("moderation_getip")."\";"); output_page($getip);
|
eval("\$getip = \"".$templates->get("moderation_getip")."\";"); output_page($getip);
|
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"))
| if(!is_moderator($fid, "canmanagethreads"))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 1164 | Zeile 1164 |
---|
eval("\$merge = \"".$templates->get("moderation_merge")."\";"); output_page($merge); break;
|
eval("\$merge = \"".$templates->get("moderation_merge")."\";"); output_page($merge); break;
|
|
|
// Lets get those threads together baby! (Merge threads) case "do_merge":
|
// Lets get those threads together baby! (Merge threads) case "do_merge":
|
|
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(!is_moderator($fid, "canmanagethreads")) {
| if(!is_moderator($fid, "canmanagethreads")) {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 1260 | Zeile 1260 |
---|
moderation_redirect("showthread.php?tid=$tid", $lang->redirect_threadsmerged); break;
|
moderation_redirect("showthread.php?tid=$tid", $lang->redirect_threadsmerged); break;
|
|
|
// 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);
|
Zeile 1277 | Zeile 1277 |
---|
"); $numposts = $db->num_rows($query); if($numposts <= "1")
|
"); $numposts = $db->num_rows($query); if($numposts <= "1")
|
{
| {
|
error($lang->error_cantsplitonepost); }
$altbg = "trow1"; $posts = '';
|
error($lang->error_cantsplitonepost); }
$altbg = "trow1"; $posts = '';
|
while($post = $db->fetch_array($query)) { $postdate = my_date($mybb->settings['dateformat'], $post['dateline']); $posttime = my_date($mybb->settings['timeformat'], $post['dateline']); $parser_options = array( "allow_html" => $forum['allowhtml'], "allow_mycode" => $forum['allowmycode'], "allow_smilies" => $forum['allowsmilies'], "allow_imgcode" => $forum['allowimgcode'], "allow_videocode" => $forum['allowvideocode'], "filter_badwords" => 1 );
| while($post = $db->fetch_array($query)) { $postdate = my_date($mybb->settings['dateformat'], $post['dateline']); $posttime = my_date($mybb->settings['timeformat'], $post['dateline']); $parser_options = array( "allow_html" => $forum['allowhtml'], "allow_mycode" => $forum['allowmycode'], "allow_smilies" => $forum['allowsmilies'], "allow_imgcode" => $forum['allowimgcode'], "allow_videocode" => $forum['allowvideocode'], "filter_badwords" => 1 );
|
if($post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0; }
|
if($post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0; }
|
|
|
$message = $parser->parse_message($post['message'], $parser_options); eval("\$posts .= \"".$templates->get("moderation_split_post")."\";"); $altbg = alt_trow(); } $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
$message = $parser->parse_message($post['message'], $parser_options); eval("\$posts .= \"".$templates->get("moderation_split_post")."\";"); $altbg = alt_trow(); } $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
|
|
$plugins->run_hooks("moderation_split");
|
$plugins->run_hooks("moderation_split");
|
|
|
eval("\$split = \"".$templates->get("moderation_split")."\";"); output_page($split); break;
|
eval("\$split = \"".$templates->get("moderation_split")."\";"); output_page($split); break;
|
|
|
// Lets break them up buddy! (Do the split) case "do_split":
|
// Lets break them up buddy! (Do the split) case "do_split":
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
$plugins->run_hooks("moderation_do_split");
if(!is_array($mybb->input['splitpost'])) { error($lang->error_nosplitposts);
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
$plugins->run_hooks("moderation_do_split");
if(!is_array($mybb->input['splitpost'])) { error($lang->error_nosplitposts);
|
} $query = $db->simple_select("posts", "COUNT(*) AS totalposts", "tid='{$tid}'"); $count = $db->fetch_array($query);
if($count['totalposts'] == 1)
|
} $query = $db->simple_select("posts", "COUNT(*) AS totalposts", "tid='{$tid}'"); $count = $db->fetch_array($query);
if($count['totalposts'] == 1)
|
{
| {
|
error($lang->error_cantsplitonepost); }
if($count['totalposts'] == count($mybb->input['splitpost']))
|
error($lang->error_cantsplitonepost); }
if($count['totalposts'] == count($mybb->input['splitpost']))
|
{
| {
|
error($lang->error_cantsplitall); }
| error($lang->error_cantsplitall); }
|
Zeile 1349 | Zeile 1349 |
---|
else { $moveto = $fid;
|
else { $moveto = $fid;
|
} $query = $db->simple_select("forums", "fid", "fid='$moveto'", array('limit' => 1)); if($db->num_rows($query) == 0)
| }
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
{ error($lang->error_invalidforum); }
| { error($lang->error_invalidforum); }
|
Zeile 1393 | Zeile 1394 |
---|
// Delete Threads - Inline moderation case "multideletethreads": add_breadcrumb($lang->nav_multi_deletethreads);
|
// Delete Threads - Inline moderation case "multideletethreads": add_breadcrumb($lang->nav_multi_deletethreads);
|
if(!empty($mybb->input['searchid']))
| if(!empty($mybb->input['searchid']))
|
{ // From search page $threads = getids($mybb->input['searchid'], 'search');
| { // From search page $threads = getids($mybb->input['searchid'], 'search');
|
Zeile 1438 | Zeile 1439 |
---|
$threadlist = explode("|", $mybb->input['threads']); if(!is_moderator_by_tids($threadlist, "candeleteposts"))
|
$threadlist = explode("|", $mybb->input['threads']); if(!is_moderator_by_tids($threadlist, "candeleteposts"))
|
{
| {
|
error_no_permission(); } foreach($threadlist as $tid)
| error_no_permission(); } foreach($threadlist as $tid)
|
Zeile 1449 | Zeile 1450 |
---|
} log_moderator_action($modlogdata, $lang->multi_deleted_threads); if($mybb->input['inlinetype'] == 'search')
|
} log_moderator_action($modlogdata, $lang->multi_deleted_threads); if($mybb->input['inlinetype'] == 'search')
|
{
| {
|
clearinline($mybb->input['searchid'], 'search');
|
clearinline($mybb->input['searchid'], 'search');
|
} else
| } else
|
{ clearinline($fid, 'forum');
|
{ clearinline($fid, 'forum');
|
}
| }
|
mark_reports($tlist, "threads"); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsdeleted); break;
// Open threads - Inline moderation
|
mark_reports($tlist, "threads"); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsdeleted); break;
// Open threads - Inline moderation
|
case "multiopenthreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']); if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->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(); } }
| case "multiopenthreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']); if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->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)
|
if(count($threads) < 1)
|
{
| {
|
error($lang->error_inline_nothreadsselected);
|
error($lang->error_inline_nothreadsselected);
|
}
| }
|
$moderation->open_threads($threads);
log_moderator_action($modlogdata, $lang->multi_opened_threads);
| $moderation->open_threads($threads);
log_moderator_action($modlogdata, $lang->multi_opened_threads);
|
Zeile 1504 | Zeile 1505 |
---|
break;
// Close threads - Inline moderation
|
break;
// Close threads - Inline moderation
|
case "multiclosethreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads')) { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
| case "multiclosethreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads')) { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
|
$moderation->close_threads($threads);
|
$moderation->close_threads($threads);
|
|
|
log_moderator_action($modlogdata, $lang->multi_closed_threads); if($mybb->input['inlinetype'] == 'search')
|
log_moderator_action($modlogdata, $lang->multi_closed_threads); if($mybb->input['inlinetype'] == 'search')
|
{
| {
|
clearinline($mybb->input['searchid'], 'search'); } else
| clearinline($mybb->input['searchid'], 'search'); } else
|
Zeile 1546 | Zeile 1547 |
---|
break;
// Approve threads - Inline moderation
|
break;
// Approve threads - Inline moderation
|
case "multiapprovethreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!empty($mybb->input['searchid'])) {
| case "multiapprovethreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if(!empty($mybb->input['searchid'])) {
|
// From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads'))
| // From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads'))
|
Zeile 1599 | Zeile 1600 |
---|
// From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads'))
|
// From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads'))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
} else {
| } else {
|
Zeile 1619 | Zeile 1620 |
---|
$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);
|
if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); }
| if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); }
|
else { clearinline($fid, 'forum');
| else { clearinline($fid, 'forum');
|
Zeile 1642 | Zeile 1643 |
---|
// From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
|
// From search page $threads = getids($mybb->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 1662 | Zeile 1663 |
---|
$moderation->stick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_stuck_threads);
|
$moderation->stick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_stuck_threads);
|
if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); } else { clearinline($fid, 'forum');
| if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); } 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 1680 | Zeile 1681 |
---|
verify_post_check($mybb->input['my_post_key']);
if(!empty($mybb->input['searchid']))
|
verify_post_check($mybb->input['my_post_key']);
if(!empty($mybb->input['searchid']))
|
{
| {
|
// From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
| // From search page $threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
|
Zeile 1692 | Zeile 1693 |
---|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads'))
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads'))
|
{
| {
|
error_no_permission(); } }
| error_no_permission(); } }
|
Zeile 1738 | Zeile 1739 |
---|
} if(count($threads) < 1)
|
} if(count($threads) < 1)
|
{
| {
|
error($lang->error_inline_nothreadsselected);
|
error($lang->error_inline_nothreadsselected);
|
}
| }
|
$inlineids = implode("|", $threads); if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search');
|
$inlineids = implode("|", $threads); if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search');
|
}
| }
|
else { clearinline($fid, 'forum');
| else { clearinline($fid, 'forum');
|
Zeile 1755 | Zeile 1756 |
---|
eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";"); output_page($movethread); break;
|
eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";"); output_page($movethread); break;
|
|
|
// Actually move the threads in Inline moderation case "do_multimovethreads":
|
// Actually move the threads in Inline moderation case "do_multimovethreads":
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$moveto = intval($mybb->input['moveto']); $threadlist = explode("|", $mybb->input['threads']); if(!is_moderator_by_tids($threadlist, 'canmanagethreads'))
|
$moveto = intval($mybb->input['moveto']); $threadlist = explode("|", $mybb->input['threads']); if(!is_moderator_by_tids($threadlist, 'canmanagethreads'))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
foreach($threadlist as $tid) { $tids[] = intval($tid);
| foreach($threadlist as $tid) { $tids[] = intval($tid);
|
Zeile 1780 | Zeile 1781 |
---|
} $newforum = get_forum($moveto);
|
} $newforum = get_forum($moveto);
|
if($newforum['type'] != "f")
| if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
{ error($lang->error_invalidforum);
|
{ error($lang->error_invalidforum);
|
}
$moderation->move_threads($tids, $moveto);
| }
$moderation->move_threads($tids, $moveto);
|
log_moderator_action($modlogdata, $lang->multi_moved_threads);
moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved);
| log_moderator_action($modlogdata, $lang->multi_moved_threads);
moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved);
|
Zeile 1854 | Zeile 1855 |
---|
}
$deletecount = 0;
|
}
$deletecount = 0;
|
foreach($postlist as $pid) {
| foreach($postlist as $pid) {
|
$pid = intval($pid); $moderation->delete_post($pid); $plist[] = $pid;
| $pid = intval($pid); $moderation->delete_post($pid); $plist[] = $pid;
|
Zeile 1980 | Zeile 1981 |
---|
} $return_url = htmlspecialchars_uni($mybb->input['url']);
|
} $return_url = htmlspecialchars_uni($mybb->input['url']);
|
|
|
eval("\$multimerge = \"".$templates->get("moderation_inline_mergeposts")."\";"); output_page($multimerge); break;
|
eval("\$multimerge = \"".$templates->get("moderation_inline_mergeposts")."\";"); output_page($multimerge); break;
|
|
|
// 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->input['my_post_key']);
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
Zeile 2000 | Zeile 2001 |
---|
foreach($mergepost as $pid => $yes) { $postlist[] = intval($pid);
|
foreach($mergepost as $pid => $yes) { $postlist[] = intval($pid);
|
}
| }
|
if(!is_moderator_by_pids($postlist, "canmanagethreads"))
|
if(!is_moderator_by_pids($postlist, "canmanagethreads"))
|
{ error_no_permission();
| { error_no_permission();
|
} foreach($postlist as $pid) { $pid = intval($pid); $plist[] = $pid;
|
} foreach($postlist as $pid) { $pid = intval($pid); $plist[] = $pid;
|
}
| }
|
$masterpid = $moderation->merge_posts($plist, $tid, $mybb->input['sep']);
mark_reports($plist, "posts");
| $masterpid = $moderation->merge_posts($plist, $tid, $mybb->input['sep']);
mark_reports($plist, "posts");
|
Zeile 2023 | Zeile 2024 |
---|
// 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->input['inlinetype'] == 'search') { $posts = getids($mybb->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(); }
| if($mybb->input['inlinetype'] == 'search') { $posts = getids($mybb->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);
| $posts = array_map('intval', $posts); $pidin = implode(',', $posts);
|
Zeile 2088 | Zeile 2089 |
---|
}
$inlineids = implode("|", $posts);
|
}
$inlineids = implode("|", $posts);
|
if($mybb->input['inlinetype'] == 'search')
| if($mybb->input['inlinetype'] == 'search')
|
{ clearinline($mybb->input['searchid'], 'search'); }
| { clearinline($mybb->input['searchid'], 'search'); }
|
Zeile 2127 | Zeile 2128 |
---|
{ $moveto = $fid; }
|
{ $moveto = $fid; }
|
$query = $db->simple_select("forums", "COUNT(fid) as count", "fid='$moveto'"); if($db->fetch_field($query, 'count') == 0)
| $newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
{ error($lang->error_invalidforum); }
|
{ error($lang->error_invalidforum); }
|
$newsubject = $mybb->input['newsubject'];
| |
|
|
| $newsubject = $mybb->input['newsubject'];
|
$newtid = $moderation->split_posts($plist, $tid, $moveto, $newsubject);
$pid_list = implode(', ', $plist);
| $newtid = $moderation->split_posts($plist, $tid, $moveto, $newsubject);
$pid_list = implode(', ', $plist);
|
Zeile 2145 | Zeile 2147 |
---|
// Approve posts - Inline moderation case "multiapproveposts":
|
// Approve posts - Inline moderation case "multiapproveposts":
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if($mybb->input['inlinetype'] == 'search') { $posts = getids($mybb->input['searchid'], 'search'); } else { $posts = getids($tid, 'thread'); } if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
if($mybb->input['inlinetype'] == 'search') { $posts = getids($mybb->input['searchid'], 'search'); } else { $posts = getids($tid, 'thread'); } 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();
|
}
| }
|
$pids = array(); foreach($posts as $pid) { $pids[] = intval($pid); }
|
$pids = array(); foreach($posts as $pid) { $pids[] = intval($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->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); } else { clearinline($tid, 'thread'); }
| if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); } else { clearinline($tid, 'thread'); }
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved); break;
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved); break;
|
Zeile 2229 | Zeile 2231 |
---|
clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsunapproved);
|
clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsunapproved);
|
break;
| break;
|
default: require_once MYBB_ROOT."inc/class_custommoderation.php"; $custommod = new CustomModeration;
| default: require_once MYBB_ROOT."inc/class_custommoderation.php"; $custommod = new CustomModeration;
|
Zeile 2257 | Zeile 2259 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
| $thread_options = unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") { error($lang->error_movetocategory); }
|
$custommod->execute(intval($mybb->input['action']), $tids); $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool);
| $custommod->execute(intval($mybb->input['action']), $tids); $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool);
|
Zeile 2282 | Zeile 2290 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
| $thread_options = unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") { error($lang->error_movetocategory); }
|
$ret = $custommod->execute(intval($mybb->input['action']), $tid); $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool); if($ret == 'forum')
|
$ret = $custommod->execute(intval($mybb->input['action']), $tid); $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool); if($ret == 'forum')
|
{
| {
|
$lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']); moderation_redirect(get_forum_link($fid), $lang->redirect_customtool_forum); }
| $lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']); moderation_redirect(get_forum_link($fid), $lang->redirect_customtool_forum); }
|
Zeile 2298 | Zeile 2313 |
---|
break; } elseif($tool['type'] == 'p' && $mybb->input['modtype'] == 'inlinepost')
|
break; } elseif($tool['type'] == 'p' && $mybb->input['modtype'] == 'inlinepost')
|
{ if($mybb->input['inlinetype'] == 'search')
| { if($mybb->input['inlinetype'] == 'search')
|
{ $pids = getids($mybb->input['searchid'], 'search'); }
| { $pids = getids($mybb->input['searchid'], 'search'); }
|
Zeile 2346 | Zeile 2361 |
---|
{ $lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']); moderation_redirect(get_forum_link($fid), $lang->redirect_customtool_forum);
|
{ $lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']); moderation_redirect(get_forum_link($fid), $lang->redirect_customtool_forum);
|
}
| }
|
else { $lang->redirect_customtool_thread = $lang->sprintf($lang->redirect_customtool_thread, $tool['name']);
| else { $lang->redirect_customtool_thread = $lang->sprintf($lang->redirect_customtool_thread, $tool['name']);
|
Zeile 2369 | Zeile 2384 |
---|
$newids = array(); $cookie = "inlinemod_".$type.$id; $cookie_ids = explode("|", $mybb->cookies[$cookie]);
|
$newids = array(); $cookie = "inlinemod_".$type.$id; $cookie_ids = explode("|", $mybb->cookies[$cookie]);
|
|
|
foreach($cookie_ids as $cookie_id) { if(empty($cookie_id))
| foreach($cookie_ids as $cookie_id) { if(empty($cookie_id))
|
Zeile 2395 | Zeile 2410 |
---|
global $db, $mybb; $ids = array();
|
global $db, $mybb; $ids = array();
|
| // Get any removed threads (after our user hit 'all') $removed_ids = array(); $cookie = "inlinemod_".$type.$id."_removed"; if($mybb->cookies[$cookie]) { $removed_ids = explode("|", $mybb->cookies[$cookie]);
if(!is_array($removed_ids)) { $removed_ids = array(); } }
|
// "Select all Threads in this forum" only supported by forumdisplay and search if($type == 'forum') { $query = $db->simple_select("threads", "tid", "fid='".intval($id)."'"); while($tid = $db->fetch_field($query, "tid")) {
|
// "Select all Threads in this forum" only supported by forumdisplay and search if($type == 'forum') { $query = $db->simple_select("threads", "tid", "fid='".intval($id)."'"); while($tid = $db->fetch_field($query, "tid")) {
|
| if(in_array($tid, $removed_ids)) { continue; }
|
$ids[] = $tid; } }
| $ids[] = $tid; } }
|
Zeile 2410 | Zeile 2443 |
---|
$query = $db->simple_select("searchlog", "*", "sid='".$db->escape_string($id)."' AND uid='{$mybb->user['uid']}'", 1); $searchlog = $db->fetch_array($query); if($searchlog['resulttype'] == 'posts')
|
$query = $db->simple_select("searchlog", "*", "sid='".$db->escape_string($id)."' AND uid='{$mybb->user['uid']}'", 1); $searchlog = $db->fetch_array($query); if($searchlog['resulttype'] == 'posts')
|
{
| {
|
$ids = explode(',', $searchlog['posts']); } else { $ids = explode(',', $searchlog['threads']);
|
$ids = explode(',', $searchlog['posts']); } else { $ids = explode(',', $searchlog['threads']);
|
| }
if(is_array($ids)) { foreach($ids as $key => $tid) { if(in_array($tid, $removed_ids)) { unset($ids[$key]); } }
|
} }
| } }
|
Zeile 2425 | Zeile 2469 |
---|
function clearinline($id, $type) { my_unsetcookie("inlinemod_".$type.$id);
|
function clearinline($id, $type) { my_unsetcookie("inlinemod_".$type.$id);
|
| my_unsetcookie("inlinemod_".$type.$id."_removed");
|
}
function extendinline($id, $type)
| }
function extendinline($id, $type)
|
Zeile 2432 | Zeile 2477 |
---|
global $mybb; my_setcookie("inlinemod_$type$id", '', TIME_NOW+3600);
|
global $mybb; my_setcookie("inlinemod_$type$id", '', TIME_NOW+3600);
|
| my_setcookie("inlinemod_$type$id_removed", '', TIME_NOW+3600);
|
}
/**
| }
/**
|