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 5587 2011-09-13 14:48:33Z Tomm $
| * $Id$
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
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); }
|
Zeile 959 | Zeile 957 |
---|
case "threadnotes": add_breadcrumb($lang->nav_threadnotes); if(!is_moderator($fid, "canmanagethreads"))
|
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 997 | Zeile 995 |
---|
$trow = alt_trow(); } if(!$modactions)
|
$trow = alt_trow(); } if(!$modactions)
|
{
| {
|
$modactions = "<tr><td class=\"trow1\" colspan=\"4\">$lang->no_mod_options</td></tr>"; }
| $modactions = "<tr><td class=\"trow1\" colspan=\"4\">$lang->no_mod_options</td></tr>"; }
|
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
| $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)
| 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)
|
Zeile 1072 | Zeile 1070 |
---|
} 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['inputs'] = unserialize($delayedmod['inputs']);
| $info .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($delayedmod['fid'])."\">".htmlspecialchars_uni($delayedmod['fname'])."</a><br />"; } $delayedmod['inputs'] = unserialize($delayedmod['inputs']);
|
Zeile 1097 | Zeile 1095 |
---|
if(!$delayedmods) { $delayedmods = "<tr><td class=\"trow1\" colspan=\"4\">{$lang->no_delayed_mods}</td></tr>";
|
if(!$delayedmods) { $delayedmods = "<tr><td class=\"trow1\" colspan=\"4\">{$lang->no_delayed_mods}</td></tr>";
|
}
| }
|
$plugins->run_hooks("moderation_threadnotes");
| $plugins->run_hooks("moderation_threadnotes");
|
Zeile 1112 | Zeile 1110 |
---|
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"))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
$plugins->run_hooks("moderation_do_threadnotes");
| $plugins->run_hooks("moderation_do_threadnotes");
|
Zeile 1130 | Zeile 1128 |
---|
case "getip": add_breadcrumb($lang->nav_getip); if(!is_moderator($fid, "canviewips"))
|
case "getip": add_breadcrumb($lang->nav_getip); if(!is_moderator($fid, "canviewips"))
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
| }
|
$hostname = @gethostbyaddr($post['ipaddress']); if(!$hostname || $hostname == $post['ipaddress']) { $hostname = $lang->resolve_fail; }
|
$hostname = @gethostbyaddr($post['ipaddress']); if(!$hostname || $hostname == $post['ipaddress']) { $hostname = $lang->resolve_fail; }
|
| $username = build_profile_link($post['username'], $post['uid']);
|
// Moderator options $modoptions = "";
| // Moderator options $modoptions = "";
|
Zeile 1350 | Zeile 1350 |
---|
{ $moveto = $fid; }
|
{ $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 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);
log_moderator_action($modlogdata, $lang->multi_closed_threads); if($mybb->input['inlinetype'] == 'search')
|
$moderation->close_threads($threads);
log_moderator_action($modlogdata, $lang->multi_closed_threads); if($mybb->input['inlinetype'] == 'search')
|
{
| {
|
clearinline($mybb->input['searchid'], 'search');
|
clearinline($mybb->input['searchid'], 'search');
|
}
| }
|
else { clearinline($fid, 'forum');
| else { clearinline($fid, 'forum');
|
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'])) { // 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();
| 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')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads')) { error_no_permission();
|
} } if(count($threads) < 1)
| } } if(count($threads) < 1)
|
Zeile 1576 | Zeile 1577 |
---|
$moderation->approve_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_approved_threads);
|
$moderation->approve_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_approved_threads);
|
if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); } else { clearinline($fid, 'forum'); } $cache->update_stats();
| if($mybb->input['inlinetype'] == 'search') { clearinline($mybb->input['searchid'], 'search'); } else { clearinline($fid, 'forum'); } $cache->update_stats();
|
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved); break;
|
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved); break;
|
|
|
// Unapprove threads - Inline moderation case "multiunapprovethreads":
| // Unapprove threads - Inline moderation case "multiunapprovethreads":
|
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(); } } else
| { error_no_permission(); } } else
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads'))
| { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads'))
|
Zeile 1615 | Zeile 1616 |
---|
{ 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);
|
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 1674 | Zeile 1675 |
---|
break;
// Unstick threads - Inline moderaton
|
break;
// Unstick threads - Inline moderaton
|
case "multiunstickthreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
| case "multiunstickthreads":
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(!empty($mybb->input['searchid']))
|
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 1688 | Zeile 1689 |
---|
error_no_permission(); } }
|
error_no_permission(); } }
|
else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads')) { error_no_permission(); } } if(count($threads) < 1)
| else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads')) { error_no_permission(); } } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected); }
|
Zeile 1735 | Zeile 1736 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
}
| }
|
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')
|
$inlineids = implode("|", $threads); if($mybb->input['inlinetype'] == 'search')
|
{
| {
|
clearinline($mybb->input['searchid'], 'search');
|
clearinline($mybb->input['searchid'], 'search');
|
}
| }
|
else { clearinline($fid, 'forum');
| else { clearinline($fid, 'forum');
|
Zeile 1754 | Zeile 1755 |
---|
$return_url = htmlspecialchars_uni($mybb->input['url']); eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";"); output_page($movethread);
|
$return_url = htmlspecialchars_uni($mybb->input['url']); eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";"); output_page($movethread);
|
break;
| break;
|
// Actually move the threads in Inline moderation case "do_multimovethreads":
| // Actually move the threads in Inline moderation case "do_multimovethreads":
|
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); }
|
Zeile 1812 | Zeile 1813 |
---|
if(!is_moderator_by_pids($posts, "candeleteposts")) { error_no_permission();
|
if(!is_moderator_by_pids($posts, "candeleteposts")) { error_no_permission();
|
}
| }
|
$inlineids = implode("|", $posts); if($mybb->input['inlinetype'] == 'search')
|
$inlineids = implode("|", $posts); if($mybb->input['inlinetype'] == 'search')
|
{
| {
|
clearinline($mybb->input['searchid'], 'search');
|
clearinline($mybb->input['searchid'], 'search');
|
}
| }
|
else { clearinline($tid, 'thread');
| else { clearinline($tid, 'thread');
|
Zeile 1830 | Zeile 1831 |
---|
break;
// Actually delete the posts in inline moderation
|
break;
// Actually delete the posts in inline moderation
|
case "do_multideleteposts":
| case "do_multideleteposts":
|
// 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 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);
|