Zeile 45 | Zeile 45 |
---|
$post = get_post($pid); if(!$post) {
|
$post = get_post($pid); if(!$post) {
|
error($lang->error_invalidpost);
| error($lang->error_invalidpost, $lang->error);
|
} $tid = $post['tid']; }
| } $tid = $post['tid']; }
|
Zeile 55 | Zeile 55 |
---|
$thread = get_thread($tid); if(!$thread) {
|
$thread = get_thread($tid); if(!$thread) {
|
error($lang->error_invalidthread);
| error($lang->error_invalidthread, $lang->error);
|
} $fid = $thread['fid']; }
| } $fid = $thread['fid']; }
|
Zeile 80 | Zeile 80 |
---|
if(!$pm) {
|
if(!$pm) {
|
error($lang->error_invalidpm);
| error($lang->error_invalidpm, $lang->error);
|
} }
| } }
|
Zeile 198 | Zeile 198 |
---|
} if(count($tids) < 1) {
|
} if(count($tids) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$mybb->input['tids'] = $tids;
| }
$mybb->input['tids'] = $tids;
|
Zeile 249 | Zeile 249 |
---|
{ case "pgsql": case "sqlite":
|
{ case "pgsql": case "sqlite":
|
$query = $db->simple_select("modtools", 'tid, name, groups', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
| $query = $db->simple_select("modtools", 'tid, name, `groups`', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
|
break; default:
|
break; default:
|
$query = $db->simple_select("modtools", 'tid, name, groups', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'");
| $query = $db->simple_select("modtools", 'tid, name, `groups`', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'");
|
} while($tool = $db->fetch_array($query)) {
| } while($tool = $db->fetch_array($query)) {
|
Zeile 580 | Zeile 580 |
---|
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";"); } }
|
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";"); } }
|
else if($delayedmod['type'] == 'merge')
| elseif($delayedmod['type'] == 'merge')
|
{ $delayedmod['subject'] = htmlspecialchars_uni($delayedmod['inputs']['subject']); $delayedmod['threadurl'] = htmlspecialchars_uni($delayedmod['inputs']['threadurl']);
| { $delayedmod['subject'] = htmlspecialchars_uni($delayedmod['inputs']['subject']); $delayedmod['threadurl'] = htmlspecialchars_uni($delayedmod['inputs']['threadurl']);
|
Zeile 619 | Zeile 619 |
---|
} if(count($tids) < 1) {
|
} if(count($tids) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$threads = $lang->sprintf($lang->threads_selected, count($tids));
| }
$threads = $lang->sprintf($lang->threads_selected, count($tids));
|
Zeile 699 | Zeile 699 |
---|
if(!is_moderator($fid, "canopenclosethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canopenclosethreads")) { error_no_permission();
|
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
if($thread['closed'] == 1)
| }
if($thread['closed'] == 1)
|
Zeile 712 | Zeile 717 |
---|
$openclose = $lang->closed; $redirect = $lang->redirect_closethread; $moderation->close_threads($tid);
|
$openclose = $lang->closed; $redirect = $lang->redirect_closethread; $moderation->close_threads($tid);
|
}
$lang->mod_process = $lang->sprintf($lang->mod_process, $openclose);
| }
$lang->mod_process = $lang->sprintf($lang->mod_process, $openclose);
|
log_moderator_action($modlogdata, $lang->mod_process);
| log_moderator_action($modlogdata, $lang->mod_process);
|
Zeile 725 | Zeile 730 |
---|
case "stick": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
case "stick": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
|
|
if(!is_moderator($fid, "canstickunstickthreads"))
|
if(!is_moderator($fid, "canstickunstickthreads"))
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
$plugins->run_hooks("moderation_stick");
| }
$plugins->run_hooks("moderation_stick");
|
Zeile 764 | Zeile 774 |
---|
error_no_permission(); }
|
error_no_permission(); }
|
$plugins->run_hooks("moderation_removeredirects");
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
$plugins->run_hooks("moderation_removeredirects");
|
$moderation->remove_redirects($tid);
| $moderation->remove_redirects($tid);
|
Zeile 774 | Zeile 789 |
---|
// Delete thread confirmation page case "deletethread":
|
// Delete thread confirmation page case "deletethread":
|
|
|
add_breadcrumb($lang->nav_deletethread);
|
add_breadcrumb($lang->nav_deletethread);
|
if(!is_moderator($fid, "candeletethreads")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
| if(!is_moderator($fid, "candeletethreads")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
|
$plugins->run_hooks("moderation_deletethread");
eval("\$deletethread = \"".$templates->get("moderation_deletethread")."\";"); output_page($deletethread);
|
$plugins->run_hooks("moderation_deletethread");
eval("\$deletethread = \"".$templates->get("moderation_deletethread")."\";"); output_page($deletethread);
|
break;
| break;
|
// Delete the actual thread here case "do_deletethread":
| // Delete the actual thread here case "do_deletethread":
|
Zeile 823 | Zeile 838 |
---|
// 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'])
| if(!is_moderator($fid, "canmanagepolls")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 835 | Zeile 850 |
---|
$plugins->run_hooks("moderation_deletepoll");
$query = $db->simple_select("polls", "pid", "tid='$tid'");
|
$plugins->run_hooks("moderation_deletepoll");
$query = $db->simple_select("polls", "pid", "tid='$tid'");
|
$poll = $db->fetch_array($query); if(!$poll) { error($lang->error_invalidpoll);
| $poll = $db->fetch_array($query); if(!$poll) { error($lang->error_invalidpoll, $lang->error);
|
}
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";");
| }
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";");
|
Zeile 850 | Zeile 865 |
---|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
if(!isset($mybb->input['delete'])) { error($lang->redirect_pollnotdeleted);
|
if(!isset($mybb->input['delete'])) { error($lang->redirect_pollnotdeleted);
|
}
| }
|
if(!is_moderator($fid, "canmanagepolls")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
| if(!is_moderator($fid, "canmanagepolls")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
|
Zeile 865 | Zeile 885 |
---|
$query = $db->simple_select("polls", "pid", "tid = $tid"); $poll = $db->fetch_array($query); if(!$poll)
|
$query = $db->simple_select("polls", "pid", "tid = $tid"); $poll = $db->fetch_array($query); if(!$poll)
|
{ error($lang->error_invalidpoll); }
$plugins->run_hooks("moderation_do_deletepoll");
| { error($lang->error_invalidpoll, $lang->error); }
$plugins->run_hooks("moderation_do_deletepoll");
|
$lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->poll_deleted);
| $lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->poll_deleted);
|
Zeile 881 | Zeile 901 |
---|
// Approve a thread case "approvethread":
|
// Approve a thread case "approvethread":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canapproveunapprovethreads")) {
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canapproveunapprovethreads")) {
|
error_no_permission(); }
|
error_no_permission(); }
|
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
$thread = get_thread($tid);
$plugins->run_hooks("moderation_approvethread");
| $thread = get_thread($tid);
$plugins->run_hooks("moderation_approvethread");
|
Zeile 897 | Zeile 923 |
---|
log_moderator_action($modlogdata, $lang->thread_approved);
$moderation->approve_threads($tid, $fid);
|
log_moderator_action($modlogdata, $lang->thread_approved);
$moderation->approve_threads($tid, $fid);
|
|
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadapproved); break;
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadapproved); break;
|
Zeile 908 | Zeile 934 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canapproveunapprovethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canapproveunapprovethreads"))
|
{ error_no_permission(); } $thread = get_thread($tid);
| { error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
$thread = get_thread($tid);
|
$plugins->run_hooks("moderation_unapprovethread");
$lang->thread_unapproved = $lang->sprintf($lang->thread_unapproved, $thread['subject']);
| $plugins->run_hooks("moderation_unapprovethread");
$lang->thread_unapproved = $lang->sprintf($lang->thread_unapproved, $thread['subject']);
|
Zeile 925 | Zeile 957 |
---|
// Restore a thread case "restorethread":
|
// Restore a thread case "restorethread":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
if(!is_moderator($fid, "canrestorethreads")) { error_no_permission();
| if(!is_moderator($fid, "canrestorethreads")) { error_no_permission();
|
Zeile 939 | Zeile 971 |
---|
$lang->thread_restored = $lang->sprintf($lang->thread_restored, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_restored);
|
$lang->thread_restored = $lang->sprintf($lang->thread_restored, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_restored);
|
|
|
$moderation->restore_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored); break;
|
$moderation->restore_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored); break;
|
|
|
// Soft delete a thread case "softdeletethread":
| // Soft delete a thread case "softdeletethread":
|
Zeile 952 | Zeile 984 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "cansoftdeletethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "cansoftdeletethreads"))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
$thread = get_thread($tid);
$plugins->run_hooks("moderation_softdeletethread");
| $thread = get_thread($tid);
$plugins->run_hooks("moderation_softdeletethread");
|
Zeile 970 | Zeile 1002 |
---|
// Move a thread case "move": add_breadcrumb($lang->nav_move);
|
// Move a thread case "move": add_breadcrumb($lang->nav_move);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
$plugins->run_hooks("moderation_move");
$forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto");
| $plugins->run_hooks("moderation_move");
$forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto");
|
Zeile 984 | Zeile 1021 |
---|
// Let's get this thing moving! case "do_move":
|
// Let's get this thing moving! case "do_move":
|
|
|
// 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 995 | Zeile 1032 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
|
|
// Check if user has moderator permission to move to destination if(!is_moderator($moveto, "canmanagethreads") && !is_moderator($fid, "canmovetononmodforum")) { error_no_permission(); }
|
// Check if user has moderator permission to move to destination if(!is_moderator($moveto, "canmanagethreads") && !is_moderator($fid, "canmovetononmodforum")) { error_no_permission(); }
|
$newperms = forum_permissions($moveto); if($newperms['canview'] == 0 && !is_moderator($fid, "canmovetononmodforum"))
| if($thread['visible'] == -1)
|
{
|
{
|
error($lang->error_movetononmodforum);
| error($lang->error_thread_deleted, $lang->error);
|
}
|
}
|
| $newperms = forum_permissions($moveto); if($newperms['canview'] == 0 && !is_moderator($fid, "canmovetononmodforum")) { error($lang->error_movetononmodforum, $lang->error); }
|
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') {
|
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') {
|
error($lang->error_invalidforum);
| error($lang->error_invalidforum, $lang->error);
|
} if($method != "copy" && $thread['fid'] == $moveto)
|
} if($method != "copy" && $thread['fid'] == $moveto)
|
{ error($lang->error_movetosameforum); }
$plugins->run_hooks('moderation_do_move');
| { error($lang->error_movetosameforum, $lang->error); }
$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;
$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);
|
$the_thread = $tid;
$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);
|
|
|
switch($method) { case "copy": log_moderator_action($modlogdata, $lang->thread_copied);
|
switch($method) { case "copy": log_moderator_action($modlogdata, $lang->thread_copied);
|
break;
| break;
|
default: case "move": case "redirect":
| default: case "move": case "redirect":
|
Zeile 1041 | Zeile 1085 |
---|
}
moderation_redirect(get_thread_link($newtid), $lang->redirect_threadmoved);
|
}
moderation_redirect(get_thread_link($newtid), $lang->redirect_threadmoved);
|
break;
| break;
|
// Viewing thread notes case "viewthreadnotes":
| // Viewing thread notes case "viewthreadnotes":
|
Zeile 1053 | Zeile 1097 |
---|
// Make sure we are looking at a real thread here. if(!$thread) {
|
// Make sure we are looking at a real thread here. if(!$thread) {
|
error($lang->error_nomember);
| error($lang->error_nomember, $lang->error);
|
}
$plugins->run_hooks('moderation_viewthreadnotes');
| }
$plugins->run_hooks('moderation_viewthreadnotes');
|
Zeile 1123 | Zeile 1167 |
---|
if(!$modactions) { eval("\$modactions = \"".$templates->get("moderation_threadnotes_modaction_error")."\";");
|
if(!$modactions) { eval("\$modactions = \"".$templates->get("moderation_threadnotes_modaction_error")."\";");
|
} }
| } }
|
$actions = array( 'openclosethread' => $lang->open_close_thread, 'deletethread' => $lang->delete_thread,
| $actions = array( 'openclosethread' => $lang->open_close_thread, 'deletethread' => $lang->delete_thread,
|
Zeile 1136 | Zeile 1180 |
---|
'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 1164 | Zeile 1208 |
---|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid) WHERE ','||d.tids||',' LIKE '%,{$tid},%'
|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid) WHERE ','||d.tids||',' LIKE '%,{$tid},%'
|
ORDER BY d.dateline DESC LIMIT 0, 20 ");
| ORDER BY d.dateline DESC LIMIT 0, 20 ");
|
break; default: $query = $db->query("
| break; default: $query = $db->query("
|
Zeile 1226 | Zeile 1270 |
---|
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";"); } }
|
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";"); } }
|
else if($delayedmod['type'] == 'merge')
| elseif($delayedmod['type'] == 'merge')
|
{ $delayedmod['subject'] = htmlspecialchars_uni($delayedmod['inputs']['subject']); $delayedmod['threadurl'] = htmlspecialchars_uni($delayedmod['inputs']['threadurl']);
| { $delayedmod['subject'] = htmlspecialchars_uni($delayedmod['inputs']['subject']); $delayedmod['threadurl'] = htmlspecialchars_uni($delayedmod['inputs']['threadurl']);
|
Zeile 1250 | Zeile 1294 |
---|
// 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->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads"))
|
verify_post_check($mybb->get_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 1292 | Zeile 1336 |
---|
if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canuseipsearch'] == 1) { $ipaddress = $post['ipaddress'];
|
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 1314 | Zeile 1358 |
---|
case "getpmip": if($pmid <= 0) {
|
case "getpmip": if($pmid <= 0) {
|
error($lang->error_invalidpm);
| error($lang->error_invalidpm, $lang->error);
|
} add_breadcrumb($lang->nav_pms, "private.php"); $pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
| } add_breadcrumb($lang->nav_pms, "private.php"); $pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
|
Zeile 1364 | Zeile 1408 |
---|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
$plugins->run_hooks("moderation_merge");
|
}
$plugins->run_hooks("moderation_merge");
|
|
|
eval("\$merge = \"".$templates->get("moderation_merge")."\";"); output_page($merge); break;
|
eval("\$merge = \"".$templates->get("moderation_merge")."\";"); output_page($merge); break;
|
|
|
// 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'));
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
$plugins->run_hooks("moderation_do_merge");
| }
$plugins->run_hooks("moderation_do_merge");
|
Zeile 1443 | Zeile 1497 |
---|
$mergethread = get_thread($mergetid); if(!$mergethread) {
|
$mergethread = get_thread($mergetid); if(!$mergethread) {
|
error($lang->error_badmergeurl);
| error($lang->error_badmergeurl, $lang->error);
|
} if($mergetid == $tid) { // sanity check
|
} if($mergetid == $tid) { // sanity check
|
error($lang->error_mergewithself);
| error($lang->error_mergewithself, $lang->error);
|
} if(!is_moderator($mergethread['fid'], "canmanagethreads")) {
| } if(!is_moderator($mergethread['fid'], "canmanagethreads")) {
|
Zeile 1476 | Zeile 1530 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
$query = $db->query(" SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p
| $query = $db->query(" SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p
|
Zeile 1483 | Zeile 1543 |
---|
WHERE tid='$tid' ORDER BY dateline ASC ");
|
WHERE tid='$tid' ORDER BY dateline ASC ");
|
|
|
$numposts = $db->num_rows($query); if($numposts <= 1) {
|
$numposts = $db->num_rows($query); if($numposts <= 1) {
|
error($lang->error_cantsplitonepost);
| error($lang->error_cantsplitonepost, $lang->error);
|
}
$altbg = "trow1";
| }
$altbg = "trow1";
|
Zeile 1532 | Zeile 1593 |
---|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
$plugins->run_hooks("moderation_do_split");
| }
$plugins->run_hooks("moderation_do_split");
|
Zeile 1539 | Zeile 1605 |
---|
$mybb->input['splitpost'] = $mybb->get_input('splitpost', MyBB::INPUT_ARRAY); if(empty($mybb->input['splitpost'])) {
|
$mybb->input['splitpost'] = $mybb->get_input('splitpost', MyBB::INPUT_ARRAY); if(empty($mybb->input['splitpost'])) {
|
error($lang->error_nosplitposts);
| error($lang->error_nosplitposts, $lang->error);
|
} $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);
| error($lang->error_cantsplitonepost, $lang->error);
|
}
if($count['totalposts'] == count($mybb->input['splitpost'])) {
|
}
if($count['totalposts'] == count($mybb->input['splitpost'])) {
|
error($lang->error_cantsplitall);
| error($lang->error_cantsplitall, $lang->error);
|
}
if(!empty($mybb->input['moveto']))
| }
if(!empty($mybb->input['moveto']))
|
Zeile 1566 | Zeile 1632 |
---|
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') {
|
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') {
|
error($lang->error_invalidforum);
| error($lang->error_invalidforum, $lang->error);
|
}
$pids = array();
| }
$pids = array();
|
Zeile 1596 | Zeile 1662 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads"))
|
{ error_no_permission();
| { error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
|
}
|
|
|
$plugins->run_hooks("moderation_removesubscriptions");
$moderation->remove_thread_subscriptions($tid, true);
|
$plugins->run_hooks("moderation_removesubscriptions");
$moderation->remove_thread_subscriptions($tid, true);
|
|
|
log_moderator_action($modlogdata, $lang->removed_subscriptions);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_removed_subscriptions); break;
|
log_moderator_action($modlogdata, $lang->removed_subscriptions);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_removed_subscriptions); break;
|
|
|
// Delete Threads - Inline moderation case "multideletethreads": add_breadcrumb($lang->nav_multi_deletethreads);
| // Delete Threads - Inline moderation case "multideletethreads": add_breadcrumb($lang->nav_multi_deletethreads);
|
Zeile 1618 | Zeile 1689 |
---|
// 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(); } }
| error_no_permission(); } }
|
Zeile 1629 | Zeile 1700 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
}
| }
|
if(count($threads) < 1) {
|
if(count($threads) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$inlineids = implode("|", $threads);
|
}
$inlineids = implode("|", $threads);
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
{ clearinline($fid, 'forum'); }
| { clearinline($fid, 'forum'); }
|
Zeile 1705 | Zeile 1776 |
---|
if(count($threads) < 1) {
|
if(count($threads) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$moderation->open_threads($threads);
| }
$moderation->open_threads($threads);
|
Zeile 1723 | Zeile 1794 |
---|
break;
// Close threads - Inline moderation
|
break;
// Close threads - Inline moderation
|
case "multiclosethreads":
| case "multiclosethreads":
|
// 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 1733 | Zeile 1804 |
---|
// 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 1746 | Zeile 1817 |
---|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$moderation->close_threads($threads);
log_moderator_action($modlogdata, $lang->multi_closed_threads); if($mybb->get_input('inlinetype') == 'search')
|
$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 1765 | Zeile 1836 |
---|
break;
// Approve threads - Inline moderation
|
break;
// Approve threads - Inline moderation
|
case "multiapprovethreads":
// Verify incoming POST request
| case "multiapprovethreads":
// Verify incoming POST request
|
verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
| verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
|
Zeile 1775 | Zeile 1846 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canapproveunapprovethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canapproveunapprovethreads'))
|
{ error_no_permission(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1788 | Zeile 1859 |
---|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected);
| { error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$moderation->approve_threads($threads, $fid);
| }
$moderation->approve_threads($threads, $fid);
|
Zeile 1808 | Zeile 1879 |
---|
break;
// Unapprove threads - Inline moderation
|
break;
// Unapprove threads - Inline moderation
|
case "multiunapprovethreads":
// Verify incoming POST request
| case "multiunapprovethreads":
// Verify incoming POST request
|
verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
| verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
|
Zeile 1818 | Zeile 1889 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canapproveunapprovethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canapproveunapprovethreads'))
|
{ error_no_permission(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1831 | Zeile 1902 |
---|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected);
| { error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$moderation->unapprove_threads($threads, $fid);
| }
$moderation->unapprove_threads($threads, $fid);
|
Zeile 1851 | Zeile 1922 |
---|
break;
// Restore threads - Inline moderation
|
break;
// Restore threads - Inline moderation
|
case "multirestorethreads":
// Verify incoming POST request
| case "multirestorethreads":
// Verify incoming POST request
|
verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
| verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
|
Zeile 1861 | Zeile 1932 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canrestorethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canrestorethreads'))
|
{ error_no_permission(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1874 | Zeile 1945 |
---|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected);
| { error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$moderation->restore_threads($threads);
| }
$moderation->restore_threads($threads);
|
Zeile 1894 | Zeile 1965 |
---|
break;
// Soft delete threads - Inline moderation
|
break;
// Soft delete threads - Inline moderation
|
case "multisoftdeletethreads":
// Verify incoming POST request
| case "multisoftdeletethreads":
// Verify incoming POST request
|
verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
| verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
|
Zeile 1904 | Zeile 1975 |
---|
// 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');
| else { $threads = getids($fid, 'forum');
|
Zeile 1917 | Zeile 1988 |
---|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected);
| { error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$moderation->soft_delete_threads($threads);
| }
$moderation->soft_delete_threads($threads);
|
Zeile 1937 | Zeile 2008 |
---|
break;
// Stick threads - Inline moderation
|
break;
// Stick threads - Inline moderation
|
case "multistickthreads":
// Verify incoming POST request
| case "multistickthreads":
// Verify incoming POST request
|
verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
| verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
|
Zeile 1947 | Zeile 2018 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))
|
{ error_no_permission(); } } else {
| { error_no_permission(); } } else {
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads')) {
| $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads')) {
|
Zeile 1960 | Zeile 2031 |
---|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$moderation->stick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_stuck_threads); if($mybb->get_input('inlinetype') == 'search')
|
$moderation->stick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_stuck_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 1979 | Zeile 2050 |
---|
break;
// Unstick threads - Inline moderaton
|
break;
// Unstick threads - Inline moderaton
|
case "multiunstickthreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| case "multiunstickthreads":
// 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'))
|
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
| { error_no_permission(); } } else
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads'))
| { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads'))
|
Zeile 2002 | Zeile 2073 |
---|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$moderation->unstick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_unstuck_threads); if($mybb->get_input('inlinetype') == 'search')
|
$moderation->unstick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_unstuck_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 2022 | Zeile 2093 |
---|
// Move threads - Inline moderation case "multimovethreads":
|
// Move threads - Inline moderation case "multimovethreads":
|
add_breadcrumb($lang->nav_multi_movethreads);
if(!empty($mybb->input['searchid'])) {
| add_breadcrumb($lang->nav_multi_movethreads);
if(!empty($mybb->input['searchid'])) {
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canmanagethreads'))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
} else {
| } else {
|
Zeile 2040 | Zeile 2111 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
}
| }
|
if(count($threads) < 1) {
|
if(count($threads) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
} $inlineids = implode("|", $threads); if($mybb->get_input('inlinetype') == 'search')
| } $inlineids = implode("|", $threads); if($mybb->get_input('inlinetype') == 'search')
|
Zeile 2068 | Zeile 2139 |
---|
verify_post_check($mybb->get_input('my_post_key'));
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);
|
verify_post_check($mybb->get_input('my_post_key'));
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);
|
| $method = $mybb->get_input('method');
|
$threadlist = explode("|", $mybb->get_input('threads')); if(!is_moderator_by_tids($threadlist, 'canmanagethreads')) {
| $threadlist = explode("|", $mybb->get_input('threads')); if(!is_moderator_by_tids($threadlist, 'canmanagethreads')) {
|
Zeile 2081 | Zeile 2154 |
---|
$newperms = forum_permissions($moveto); if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, 'canmovetononmodforum')) {
|
$newperms = forum_permissions($moveto); if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, 'canmovetononmodforum')) {
|
error($lang->error_movetononmodforum);
| error($lang->error_movetononmodforum, $lang->error);
|
}
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') {
|
}
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') {
|
error($lang->error_invalidforum);
| error($lang->error_invalidforum, $lang->error);
|
}
|
}
|
$moderation->move_threads($tids, $moveto);
| $plugins->run_hooks('moderation_do_multimovethreads');
|
log_moderator_action($modlogdata, $lang->multi_moved_threads);
|
log_moderator_action($modlogdata, $lang->multi_moved_threads);
|
| $expire = 0; if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0) { $expire = TIME_NOW + ($mybb->get_input('redirect_expire', MyBB::INPUT_INT) * 86400); }
foreach($tids as $tid) { $moderation->move_thread($tid, $moveto, $method, $expire); }
|
moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved); break;
|
moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved); break;
|
|
|
// 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') { $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, "candeleteposts")) { error_no_permission(); } $inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread');
| if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); }
if(count($posts) < 1) { error($lang->error_inline_nopostsselected, $lang->error); } if(!is_moderator_by_pids($posts, "candeleteposts")) { error_no_permission(); } $inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') { 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 2234 | Zeile 2316 |
---|
}
if(empty($posts))
|
}
if(empty($posts))
|
{ error($lang->error_inline_nopostsselected); }
if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission(); }
| { error($lang->error_inline_nopostsselected, $lang->error); }
if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission(); }
|
$postlist = ""; $query = $db->query(" SELECT p.*, u.*
| $postlist = ""; $query = $db->query(" SELECT p.*, u.*
|
Zeile 2253 | Zeile 2335 |
---|
"); $altbg = "trow1"; while($post = $db->fetch_array($query))
|
"); $altbg = "trow1"; while($post = $db->fetch_array($query))
|
{
| {
|
$postdate = my_date('relative', $post['dateline']);
$parser_options = array(
| $postdate = my_date('relative', $post['dateline']);
$parser_options = array(
|
Zeile 2272 | Zeile 2354 |
---|
$message = $parser->parse_message($post['message'], $parser_options); eval("\$postlist .= \"".$templates->get("moderation_mergeposts_post")."\";"); $altbg = alt_trow();
|
$message = $parser->parse_message($post['message'], $parser_options); eval("\$postlist .= \"".$templates->get("moderation_mergeposts_post")."\";"); $altbg = alt_trow();
|
}
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread');
| }
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') { 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 2299 | Zeile 2381 |
---|
$mergepost = $mybb->get_input('mergepost', MyBB::INPUT_ARRAY); if(count($mergepost) <= 1) {
|
$mergepost = $mybb->get_input('mergepost', MyBB::INPUT_ARRAY); if(count($mergepost) <= 1) {
|
error($lang->error_nomergeposts);
| error($lang->error_nomergeposts, $lang->error);
|
}
foreach($mergepost as $pid => $yes)
| }
foreach($mergepost as $pid => $yes)
|
Zeile 2334 | Zeile 2416 |
---|
if(count($posts) < 1) {
|
if(count($posts) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
}
if(!is_moderator_by_pids($posts, "canmanagethreads"))
| }
if(!is_moderator_by_pids($posts, "canmanagethreads"))
|
Zeile 2358 | Zeile 2440 |
---|
{ if((int)$tcheck['count'] <= 1) {
|
{ if((int)$tcheck['count'] <= 1) {
|
error($lang->error_cantsplitonepost);
| error($lang->error_cantsplitonepost, $lang->error);
|
} $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below
|
} $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below
|
}
| }
|
// Make sure that we are not splitting all posts in the thread // The query does not return a row when the count is 0, so find if some threads are missing (i.e. 0 posts after removal)
| // Make sure that we are not splitting all posts in the thread // The query does not return a row when the count is 0, so find if some threads are missing (i.e. 0 posts after removal)
|
Zeile 2383 | Zeile 2465 |
---|
if(count($pcheck2) != count($pcheck)) { // One or more threads do not have posts after splitting
|
if(count($pcheck2) != count($pcheck)) { // One or more threads do not have posts after splitting
|
error($lang->error_cantsplitall);
| error($lang->error_cantsplitall, $lang->error);
|
}
$inlineids = implode("|", $posts);
| }
$inlineids = implode("|", $posts);
|
Zeile 2396 | Zeile 2478 |
---|
clearinline($tid, 'thread'); } $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
clearinline($tid, 'thread'); } $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
|
|
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
|
|
eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";"); output_page($splitposts);
|
eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";"); output_page($splitposts);
|
break;
// Actually split the posts - Inline moderation case "do_multisplitposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$plist = array(); $postlist = explode("|", $mybb->get_input('posts')); foreach($postlist as $pid) { $pid = (int)$pid;
| break;
// Actually split the posts - Inline moderation case "do_multisplitposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$plist = array(); $postlist = explode("|", $mybb->get_input('posts')); foreach($postlist as $pid) { $pid = (int)$pid;
|
$plist[] = $pid; }
if(!is_moderator_by_pids($plist, "canmanagethreads")) { error_no_permission();
|
$plist[] = $pid; }
if(!is_moderator_by_pids($plist, "canmanagethreads")) { error_no_permission();
|
}
| }
|
// Ensure all posts exist $posts = array();
| // Ensure all posts exist $posts = array();
|
Zeile 2435 | Zeile 2517 |
---|
if(empty($posts)) {
|
if(empty($posts)) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
}
$pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post // Select number of posts in each thread that the splitted post is in
|
}
$pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post // Select number of posts in each thread that the splitted post is in
|
$query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count
| $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)
|
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
| GROUP BY p.tid, p.pid
|
"); $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1) {
|
"); $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1) {
|
error($lang->error_cantsplitonepost);
| error($lang->error_cantsplitonepost, $lang->error);
|
} $pcheck[] = $tcheck['tid']; // Save tids for below
|
} $pcheck[] = $tcheck['tid']; // Save tids for below
|
}
| }
|
// Make sure that we are not splitting all posts in the thread // The query does not return a row when the count is 0, so find if some threads are missing (i.e. 0 posts after removal) $query = $db->query("
| // Make sure that we are not splitting all posts in the thread // The query does not return a row when the count is 0, so find if some threads are missing (i.e. 0 posts after removal) $query = $db->query("
|
Zeile 2479 | Zeile 2561 |
---|
if(count($pcheck2) != count($pcheck)) { // One or more threads do not have posts after splitting
|
if(count($pcheck2) != count($pcheck)) { // One or more threads do not have posts after splitting
|
error($lang->error_cantsplitall);
| error($lang->error_cantsplitall, $lang->error);
|
}
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, $lang->error);
|
}
|
}
|
|
|
$newsubject = $mybb->get_input('newsubject'); $newtid = $moderation->split_posts($posts, $tid, $moveto, $newsubject);
|
$newsubject = $mybb->get_input('newsubject'); $newtid = $moderation->split_posts($posts, $tid, $moveto, $newsubject);
|
|
|
$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);
|
Zeile 2522 | Zeile 2604 |
---|
if(count($posts) < 1) {
|
if(count($posts) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
}
if(!is_moderator_by_pids($posts, "canmanagethreads"))
| }
if(!is_moderator_by_pids($posts, "canmanagethreads"))
|
Zeile 2530 | Zeile 2612 |
---|
error_no_permission(); } $posts = array_map('intval', $posts);
|
error_no_permission(); } $posts = array_map('intval', $posts);
|
$pidin = implode(',', $posts);
| $pidin = implode(',', $posts);
|
// Make sure that we are not moving posts in a thread with one post // Select number of posts in each thread that the moved post is in $query = $db->query("
| // 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("
|
Zeile 2546 | Zeile 2628 |
---|
{ if((int)$tcheck['count'] <= 1) {
|
{ if((int)$tcheck['count'] <= 1) {
|
error($lang->error_cantsplitonepost);
| error($lang->error_cantsplitonepost, $lang->error);
|
} $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
| } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
|
Zeile 2571 | Zeile 2653 |
---|
if(count($pcheck2) != count($pcheck)) { // One or more threads do not have posts after splitting
|
if(count($pcheck2) != count($pcheck)) { // One or more threads do not have posts after splitting
|
error($lang->error_cantmoveall);
| error($lang->error_cantmoveall, $lang->error);
|
}
$inlineids = implode("|", $posts);
| }
$inlineids = implode("|", $posts);
|
Zeile 2615 | Zeile 2697 |
---|
if($postmatch[1]) { $parameters['pid'] = $postmatch[1];
|
if($postmatch[1]) { $parameters['pid'] = $postmatch[1];
|
} }
| } }
|
else { // Get thread to merge's tid the normal way
| else { // Get thread to merge's tid the normal way
|
Zeile 2656 | Zeile 2738 |
---|
$newthread = get_thread($newtid); if(!$newthread) {
|
$newthread = get_thread($newtid); if(!$newthread) {
|
error($lang->error_badmovepostsurl);
| error($lang->error_badmovepostsurl, $lang->error);
|
} if($newtid == $tid) { // sanity check
|
} if($newtid == $tid) { // sanity check
|
error($lang->error_movetoself);
| error($lang->error_movetoself, $lang->error);
|
}
$postlist = explode("|", $mybb->get_input('posts'));
| }
$postlist = explode("|", $mybb->get_input('posts'));
|
Zeile 2689 | Zeile 2771 |
---|
if(empty($posts)) {
|
if(empty($posts)) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
}
$pidin = implode(',', $posts);
| }
$pidin = implode(',', $posts);
|
Zeile 2708 | Zeile 2790 |
---|
{ if((int)$tcheck['count'] <= 1) {
|
{ if((int)$tcheck['count'] <= 1) {
|
error($lang->error_cantsplitonepost);
| error($lang->error_cantsplitonepost, $lang->error);
|
} $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
| } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
|
Zeile 2733 | Zeile 2815 |
---|
if(count($pcheck2) != count($pcheck)) { // One or more threads do not have posts after splitting
|
if(count($pcheck2) != count($pcheck)) { // One or more threads do not have posts after splitting
|
error($lang->error_cantmoveall);
| error($lang->error_cantmoveall, $lang->error);
|
}
$newtid = $moderation->split_posts($posts, $tid, $newthread['fid'], $db->escape_string($newthread['subject']), $newtid);
| }
$newtid = $moderation->split_posts($posts, $tid, $newthread['fid'], $db->escape_string($newthread['subject']), $newtid);
|
Zeile 2747 | Zeile 2829 |
---|
// 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'); } if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
| // 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, $lang->error);
|
}
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 = array(); foreach($posts as $pid)
|
Zeile 2790 | Zeile 2872 |
---|
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 { $posts = getids($tid, 'thread'); }
| 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) {
|
if(count($posts) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
} $pids = array();
| } $pids = array();
|
Zeile 2815 | Zeile 2897 |
---|
error_no_permission(); } foreach($posts as $pid)
|
error_no_permission(); } foreach($posts as $pid)
|
{
| {
|
$pids[] = (int)$pid; }
| $pids[] = (int)$pid; }
|
Zeile 2825 | Zeile 2907 |
---|
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($tid, 'thread');
| else { clearinline($tid, 'thread');
|
Zeile 2834 | Zeile 2916 |
---|
break;
// Restore posts - Inline moderation
|
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'); }
| 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) {
|
if(count($posts) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
}
if(!is_moderator_by_pids($posts, "canrestoreposts"))
|
}
if(!is_moderator_by_pids($posts, "canrestoreposts"))
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 2889 | Zeile 2971 |
---|
else { $posts = getids($tid, 'thread');
|
else { $posts = getids($tid, 'thread');
|
}
| }
|
if(count($posts) < 1) {
|
if(count($posts) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
} $pids = array();
|
} $pids = array();
|
|
|
if(!is_moderator_by_pids($posts, "cansoftdeleteposts")) { error_no_permission();
| if(!is_moderator_by_pids($posts, "cansoftdeleteposts")) { error_no_permission();
|
Zeile 2922 | Zeile 3004 |
---|
case "do_purgespammer": case "purgespammer": require_once MYBB_ROOT."inc/functions_user.php";
|
case "do_purgespammer": case "purgespammer": require_once MYBB_ROOT."inc/functions_user.php";
|
|
|
$groups = explode(",", $mybb->settings['purgespammergroups']); if(!is_member($groups)) {
| $groups = explode(",", $mybb->settings['purgespammergroups']); if(!is_member($groups)) {
|
Zeile 2932 | Zeile 3014 |
---|
$uid = $mybb->get_input('uid', MyBB::INPUT_INT); $user = get_user($uid); if(!$user['uid'] || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid']))
|
$uid = $mybb->get_input('uid', MyBB::INPUT_INT); $user = get_user($uid); if(!$user['uid'] || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid']))
|
{
| {
|
error($lang->purgespammer_invalid_user); }
| error($lang->purgespammer_invalid_user); }
|
Zeile 3015 | Zeile 3097 |
---|
if(!empty($mybb->settings['purgespammerapikey'])) { $sfs = @fetch_remote_file("http://stopforumspam.com/add.php?username=" . urlencode($user['username']) . "&ip_addr=" . urlencode(my_inet_ntop($db->unescape_binary($user['lastip']))) . "&email=" . urlencode($user['email']) . "&api_key=" . urlencode($mybb->settings['purgespammerapikey']));
|
if(!empty($mybb->settings['purgespammerapikey'])) { $sfs = @fetch_remote_file("http://stopforumspam.com/add.php?username=" . urlencode($user['username']) . "&ip_addr=" . urlencode(my_inet_ntop($db->unescape_binary($user['lastip']))) . "&email=" . urlencode($user['email']) . "&api_key=" . urlencode($mybb->settings['purgespammerapikey']));
|
}
| }
|
log_moderator_action(array('uid' => $uid, 'username' => $user['username']), $lang->purgespammer_modlog);
if($user_deleted)
| log_moderator_action(array('uid' => $uid, 'username' => $user['username']), $lang->purgespammer_modlog);
if($user_deleted)
|
Zeile 3028 | Zeile 3110 |
---|
redirect(get_profile_link($uid), $lang->purgespammer_success); } }
|
redirect(get_profile_link($uid), $lang->purgespammer_success); } }
|
else if($mybb->input['action'] == "purgespammer")
| elseif($mybb->input['action'] == "purgespammer")
|
{ $plugins->run_hooks("moderation_purgespammer_show");
| { $plugins->run_hooks("moderation_purgespammer_show");
|
Zeile 3060 | Zeile 3142 |
---|
if(!is_member($tool['groups'])) { error_no_permission();
|
if(!is_member($tool['groups'])) { error_no_permission();
|
| } if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error);
|
}
if(!empty($options['confirmation']) && empty($mybb->input['confirm']))
|
}
if(!empty($options['confirmation']) && empty($mybb->input['confirm']))
|
{
| {
|
add_breadcrumb($lang->confirm_execute_tool);
$lang->confirm_execute_tool_desc = $lang->sprintf($lang->confirm_execute_tool_desc, htmlspecialchars_uni($tool['name']));
| add_breadcrumb($lang->confirm_execute_tool);
$lang->confirm_execute_tool_desc = $lang->sprintf($lang->confirm_execute_tool_desc, htmlspecialchars_uni($tool['name']));
|
Zeile 3082 | Zeile 3169 |
---|
}
$tool['name'] = htmlspecialchars_uni($tool['name']);
|
}
$tool['name'] = htmlspecialchars_uni($tool['name']);
|
|
|
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 3092 | Zeile 3179 |
---|
else { $tids = getids($fid, "forum");
|
else { $tids = getids($fid, "forum");
|
}
| }
|
if(count($tids) < 1) {
|
if(count($tids) < 1) {
|
error($lang->error_inline_nopostsselected); } if(!is_moderator_by_tids($tids, "canusecustomtools")) { error_no_permission();
| error($lang->error_inline_nopostsselected, $lang->error);
|
}
|
}
|
$thread_options = my_unserialize($tool['threadoptions']);
| if(!is_moderator_by_tids($tids, "canusecustomtools")) { error_no_permission(); }
$thread_options = my_unserialize($tool['threadoptions']);
|
if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") {
|
if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") {
|
error($lang->error_movetocategory);
| error($lang->error_movetocategory, $lang->error);
|
}
$custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids);
|
}
$custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $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->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']); $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
log_moderator_action($modlogdata, $lang->custom_tool); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']); $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
redirect($return_url, $lang->redirect_customtool_search);
| moderation_redirect($return_url, $lang->redirect_customtool_search);
|
} else {
| } else {
|
Zeile 3131 | Zeile 3218 |
---|
if(!is_moderator_by_tids($tid, "canusecustomtools")) { error_no_permission();
|
if(!is_moderator_by_tids($tid, "canusecustomtools")) { error_no_permission();
|
}
| }
|
$thread_options = my_unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") {
|
$thread_options = my_unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") {
|
error($lang->error_movetocategory);
| error($lang->error_movetocategory, $lang->error);
|
}
$ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tid);
| }
$ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tid);
|
Zeile 3146 | Zeile 3233 |
---|
{ $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
| } else
|
{ $lang->redirect_customtool_thread = $lang->sprintf($lang->redirect_customtool_thread, $tool['name']); moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_customtool_thread);
| { $lang->redirect_customtool_thread = $lang->sprintf($lang->redirect_customtool_thread, $tool['name']); moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_customtool_thread);
|
Zeile 3163 | Zeile 3250 |
---|
else { $pids = getids($tid, 'thread');
|
else { $pids = getids($tid, 'thread');
|
}
| }
|
if(count($pids) < 1) {
|
if(count($pids) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
} if(!is_moderator_by_pids($pids, "canusecustomtools")) {
| } if(!is_moderator_by_pids($pids, "canusecustomtools")) {
|
Zeile 3190 | Zeile 3277 |
---|
$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool); if($mybb->get_input('inlinetype') == 'search')
|
$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool); if($mybb->get_input('inlinetype') == 'search')
|
{
| {
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']); $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']); $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
redirect($return_url, $lang->redirect_customtool_search);
| moderation_redirect($return_url, $lang->redirect_customtool_search);
|
} else {
| } else {
|
Zeile 3232 | Zeile 3319 |
---|
$newids = array(); $cookie = "inlinemod_".$type.$id;
|
$newids = array(); $cookie = "inlinemod_".$type.$id;
|
if(isset($mybb->cookies[$cookie])) {
| if(isset($mybb->cookies[$cookie])) {
|
$cookie_ids = explode("|", $mybb->cookies[$cookie]);
foreach($cookie_ids as $cookie_id) { if(empty($cookie_id))
|
$cookie_ids = explode("|", $mybb->cookies[$cookie]);
foreach($cookie_ids as $cookie_id) { if(empty($cookie_id))
|
{
| {
|
continue; }
if($cookie_id == 'ALL')
|
continue; }
if($cookie_id == 'ALL')
|
{
| {
|
$newids += getallids($id, $type); } else
| $newids += getallids($id, $type); } else
|
Zeile 3275 | Zeile 3362 |
---|
if(isset($mybb->cookies[$cookie])) { $removed_ids = explode("|", $mybb->cookies[$cookie]);
|
if(isset($mybb->cookies[$cookie])) { $removed_ids = explode("|", $mybb->cookies[$cookie]);
|
|
|
if(!is_array($removed_ids)) { $removed_ids = array();
|
if(!is_array($removed_ids)) { $removed_ids = array();
|
} }
| } }
|
// "Select all Threads in this forum" only supported by forumdisplay and search if($type == 'forum') {
| // "Select all Threads in this forum" only supported by forumdisplay and search if($type == 'forum') {
|
Zeile 3291 | Zeile 3378 |
---|
if(in_array($tid, $removed_ids)) { continue;
|
if(in_array($tid, $removed_ids)) { continue;
|
}
| }
|
$ids[] = $tid; } }
|
$ids[] = $tid; } }
|
else if($type == 'search')
| elseif($type == 'search')
|
{ $query = $db->simple_select("searchlog", "resulttype, posts, threads", "sid='".$db->escape_string($id)."' AND uid='{$mybb->user['uid']}'", 1); $searchlog = $db->fetch_array($query); if($searchlog['resulttype'] == 'posts') { $ids = explode(',', $searchlog['posts']);
|
{ $query = $db->simple_select("searchlog", "resulttype, posts, threads", "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']);
| else { $ids = explode(',', $searchlog['threads']);
|
Zeile 3318 | Zeile 3405 |
---|
unset($ids[$key]); } }
|
unset($ids[$key]); } }
|
}
| }
|
}
return $ids;
|
}
return $ids;
|
}
/** * @param int $id * @param string $type */
| }
/** * @param int $id * @param string $type */
|
function clearinline($id, $type) { my_unsetcookie("inlinemod_".$type.$id);
| function clearinline($id, $type) { my_unsetcookie("inlinemod_".$type.$id);
|
Zeile 3355 | Zeile 3442 |
---|
* @return bool True if moderator of all; false otherwise */ function is_moderator_by_pids($posts, $permission='')
|
* @return bool True if moderator of all; false otherwise */ function is_moderator_by_pids($posts, $permission='')
|
{ global $db, $mybb;
// Speedy determination for supermods/admins and guests if($mybb->usergroup['issupermod']) {
| { global $db, $mybb;
// Speedy determination for supermods/admins and guests if($mybb->usergroup['issupermod']) {
|
return true; } elseif(!$mybb->user['uid'])
| return true; } elseif(!$mybb->user['uid'])
|
Zeile 3443 | Zeile 3530 |
---|
global $mybb; if(!empty($mybb->input['url'])) {
|
global $mybb; if(!empty($mybb->input['url'])) {
|
redirect(htmlentities($mybb->input['url']), $message, $title);
| $url = htmlentities($mybb->input['url']);
|
}
|
}
|
| if(my_strpos($url, $mybb->settings['bburl'].'/') !== 0) { if(my_strpos($url, '/') === 0) { $url = my_substr($url, 1); } $url_segments = explode('/', $url); $url = $mybb->settings['bburl'].'/'.end($url_segments); }
|
redirect($url, $message, $title); }
| redirect($url, $message, $title); }
|