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$
|
*/
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 1108 | Zeile 1106 |
---|
// Update the thread notes! case "do_threadnotes":
|
// Update the thread notes! case "do_threadnotes":
|
// 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")) { error_no_permission();
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
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 ); if($post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0;
| 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;
|
}
|
}
|
|
|
$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");
eval("\$split = \"".$templates->get("moderation_split")."\";");
| $plugins->run_hooks("moderation_split");
eval("\$split = \"".$templates->get("moderation_split")."\";");
|
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(); } }
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected); }
| 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) { error($lang->error_inline_nothreadsselected); }
|
$moderation->open_threads($threads);
|
$moderation->open_threads($threads);
|
|
|
log_moderator_action($modlogdata, $lang->multi_opened_threads); if($mybb->input['inlinetype'] == 'search')
|
log_moderator_action($modlogdata, $lang->multi_opened_threads); if($mybb->input['inlinetype'] == 'search')
|
{
| {
|
clearinline($mybb->input['searchid'], 'search'); } else
| clearinline($mybb->input['searchid'], 'search'); } else
|
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
| 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'))
|
$threads = getids($mybb->input['searchid'], 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads'))
|
{ error_no_permission(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1534 | Zeile 1535 |
---|
$moderation->close_threads($threads);
log_moderator_action($modlogdata, $lang->multi_closed_threads);
|
$moderation->close_threads($threads);
log_moderator_action($modlogdata, $lang->multi_closed_threads);
|
if($mybb->input['inlinetype'] == 'search') {
| if($mybb->input['inlinetype'] == 'search') {
|
clearinline($mybb->input['searchid'], 'search'); } else
|
clearinline($mybb->input['searchid'], 'search'); } else
|
{
| {
|
clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsclosed); break;
|
clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsclosed); break;
|
|
|
// Approve threads - Inline moderation
|
// 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(); }
| 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
|
} else
|
{
| {
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads')) { error_no_permission(); }
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canmanagethreads')) { error_no_permission(); }
|
}
| }
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
| if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
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 {
| 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;
|
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":
|
|
|
// 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 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 1674 | Zeile 1675 |
---|
break;
// Unstick threads - Inline moderaton
|
break;
// Unstick threads - Inline moderaton
|
case "multiunstickthreads":
| case "multiunstickthreads":
|
// 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 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 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 2146 | Zeile 2148 |
---|
// 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); } if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission(); }
$pids = array(); foreach($posts as $pid) { $pids[] = intval($pid); }
| // 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")) { error_no_permission(); }
$pids = array(); foreach($posts as $pid) { $pids[] = intval($pid); }
|
$moderation->approve_posts($pids);
log_moderator_action($modlogdata, $lang->multi_approve_posts); if($mybb->input['inlinetype'] == 'search')
|
$moderation->approve_posts($pids);
log_moderator_action($modlogdata, $lang->multi_approve_posts); if($mybb->input['inlinetype'] == 'search')
|
{
| {
|
clearinline($mybb->input['searchid'], 'search');
|
clearinline($mybb->input['searchid'], 'search');
|
}
| }
|
else { clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved);
|
else { clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved);
|
break;
| break;
|
// Unapprove posts - Inline moderation case "multiunapproveposts":
| // Unapprove posts - Inline moderation case "multiunapproveposts":
|
Zeile 2213 | Zeile 2215 |
---|
error_no_permission(); } foreach($posts as $pid)
|
error_no_permission(); } foreach($posts as $pid)
|
{
| {
|
$pids[] = intval($pid); }
| $pids[] = intval($pid); }
|
Zeile 2240 | Zeile 2242 |
---|
verify_post_check($mybb->input['my_post_key']);
if($tool['type'] == 't' && $mybb->input['modtype'] == 'inlinethread')
|
verify_post_check($mybb->input['my_post_key']);
if($tool['type'] == 't' && $mybb->input['modtype'] == 'inlinethread')
|
{ if($mybb->input['inlinetype'] == 'search')
| { if($mybb->input['inlinetype'] == 'search')
|
{ $tids = getids($mybb->input['searchid'], 'search');
|
{ $tids = getids($mybb->input['searchid'], 'search');
|
}
| }
|
else { $tids = getids($fid, "forum"); } if(count($tids) < 1)
|
else { $tids = getids($fid, "forum"); } if(count($tids) < 1)
|
{
| {
|
error($lang->error_inline_nopostsselected); } if(!is_moderator_by_tids($tids)) { error_no_permission();
|
error($lang->error_inline_nopostsselected); } if(!is_moderator_by_tids($tids)) { error_no_permission();
|
}
| }
|
$thread_options = unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f")
| $thread_options = unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f")
|
Zeile 2265 | Zeile 2267 |
---|
}
$custommod->execute(intval($mybb->input['action']), $tids);
|
}
$custommod->execute(intval($mybb->input['action']), $tids);
|
$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
| $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
|
log_moderator_action($modlogdata, $lang->custom_tool); if($mybb->input['inlinetype'] == 'search') {
| log_moderator_action($modlogdata, $lang->custom_tool); if($mybb->input['inlinetype'] == 'search') {
|
Zeile 2279 | Zeile 2281 |
---|
clearinline($fid, "forum"); $lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']); redirect(get_forum_link($fid), $lang->redirect_customtool_forum);
|
clearinline($fid, "forum"); $lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']); redirect(get_forum_link($fid), $lang->redirect_customtool_forum);
|
}
| }
|
break; } elseif($tool['type'] == 't' && $mybb->input['modtype'] == 'thread') { if(!is_moderator_by_tids($tid))
|
break; } elseif($tool['type'] == 't' && $mybb->input['modtype'] == 'thread') { if(!is_moderator_by_tids($tid))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
$thread_options = unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f")
|
$thread_options = unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f")
|
{
| {
|
error($lang->error_movetocategory); }
| error($lang->error_movetocategory); }
|
Zeile 2311 | 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 2382 | 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 2408 | 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 2423 | 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 2438 | 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 2445 | 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);
|
}
/**
| }
/**
|