Zeile 11 | Zeile 11 |
---|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'moderation.php');
|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'moderation.php');
|
$templatelist = "changeuserbox,loginbox,moderation_delayedmoderation_custommodtool,moderation_delayedmodaction_notes,moderation_delayedmoderation_merge,moderation_delayedmoderation_move"; $templatelist .= ",moderation_delayedmoderation,moderation_deletethread,moderation_deletepoll,moderation_mergeposts_post,moderation_viewthreadnotes,moderation_confirmation,moderation_purgespammer"; $templatelist .= ",moderation_move,moderation_threadnotes_modaction,moderation_threadnotes_delayedmodaction,moderation_threadnotes,moderation_getip_modoptions,moderation_getip,moderation_getpmip";
| $templatelist = "changeuserbox,loginbox,moderation_delayedmoderation_custommodtool,moderation_delayedmodaction_notes,moderation_delayedmoderation_merge,moderation_delayedmoderation_move,moderation_threadnotes"; $templatelist .= ",moderation_delayedmoderation,moderation_deletethread,moderation_deletepoll,moderation_mergeposts_post,moderation_viewthreadnotes,moderation_confirmation,moderation_purgespammer,forumjump_bit"; $templatelist .= ",moderation_move,moderation_threadnotes_modaction,moderation_threadnotes_delayedmodaction,moderation_getip_modoptions,moderation_getip,moderation_getpmip,moderation_getpmip_modal";
|
$templatelist .= ",moderation_split_post,moderation_inline_deletethreads,moderation_inline_movethreads,moderation_inline_deleteposts,moderation_inline_mergeposts,moderation_threadnotes_modaction_error"; $templatelist .= ",moderation_inline_splitposts,forumjump_special,forumjump_advanced,forumdisplay_password_wrongpass,forumdisplay_password,moderation_inline_moveposts,moderation_delayedmodaction_error"; $templatelist .= ",moderation_delayedmodaction_notes_thread_single,moderation_delayedmodaction_notes_thread_multiple,moderation_delayedmodaction_notes_forum,moderation_delayedmodaction_notes_new_forum";
|
$templatelist .= ",moderation_split_post,moderation_inline_deletethreads,moderation_inline_movethreads,moderation_inline_deleteposts,moderation_inline_mergeposts,moderation_threadnotes_modaction_error"; $templatelist .= ",moderation_inline_splitposts,forumjump_special,forumjump_advanced,forumdisplay_password_wrongpass,forumdisplay_password,moderation_inline_moveposts,moderation_delayedmodaction_error"; $templatelist .= ",moderation_delayedmodaction_notes_thread_single,moderation_delayedmodaction_notes_thread_multiple,moderation_delayedmodaction_notes_forum,moderation_delayedmodaction_notes_new_forum";
|
$templatelist .= ",moderation_delayedmodaction_notes_redirect,moderation_delayedmodaction_notes_merge,moderation_delayedmoderation_thread,moderation_threadnotes_modaction_thread,forumjump_bit";
| $templatelist .= ",moderation_delayedmodaction_notes_redirect,moderation_delayedmodaction_notes_merge,moderation_delayedmoderation_thread,moderation_threadnotes_modaction_thread,moderation_getip_modal";
|
$templatelist .= ",moderation_delayedmoderation_date_day,moderation_delayedmoderation_date_month,moderation_threadnotes_modaction_post,moderation_merge,moderation_split,moderation_threadnotes_modaction_forum";
|
$templatelist .= ",moderation_delayedmoderation_date_day,moderation_delayedmoderation_date_month,moderation_threadnotes_modaction_post,moderation_merge,moderation_split,moderation_threadnotes_modaction_forum";
|
| $templatelist .= ",moderation_delayedmoderation_openclose,moderation_delayedmoderation_softdeleterestore,moderation_delayedmoderation_delete,moderation_delayedmoderation_stick,moderation_delayedmoderation_approve";
|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
| require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
|
Zeile 37 | Zeile 38 |
---|
$pid = $mybb->get_input('pid', MyBB::INPUT_INT); $fid = $mybb->get_input('fid', MyBB::INPUT_INT); $pmid = $mybb->get_input('pmid', MyBB::INPUT_INT);
|
$pid = $mybb->get_input('pid', MyBB::INPUT_INT); $fid = $mybb->get_input('fid', MyBB::INPUT_INT); $pmid = $mybb->get_input('pmid', MyBB::INPUT_INT);
|
| $modal = $mybb->get_input('modal', MyBB::INPUT_INT);
|
if($pid) { $post = get_post($pid); if(!$post) {
|
if($pid) { $post = get_post($pid); if(!$post) {
|
error($lang->error_invalidpost);
| error($lang->error_invalidpost, $lang->error);
|
} $tid = $post['tid']; }
| } $tid = $post['tid']; }
|
Zeile 53 | 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 78 | Zeile 80 |
---|
if(!$pm) {
|
if(!$pm) {
|
error($lang->error_invalidpm);
| error($lang->error_invalidpm, $lang->error);
|
} }
| } }
|
Zeile 106 | Zeile 108 |
---|
{ // Check if this forum is password protected and we have a valid password check_forum_password($forum['fid']);
|
{ // Check if this forum is password protected and we have a valid password check_forum_password($forum['fid']);
|
| }
$log_multithreads_actions = array("do_multideletethreads", "multiclosethreads", "multiopenthreads", "multiapprovethreads", "multiunapprovethreads", "multirestorethreads", "multisoftdeletethreads","multistickthreads", "multiunstickthreads", "do_multimovethreads"); if(in_array($mybb->input['action'], $log_multithreads_actions)) { if(!empty($mybb->input['searchid'])) { $tids = getids($mybb->get_input('searchid'), 'search'); } else { $tids = getids($fid, 'forum'); }
$modlogdata['tids'] = (array)$tids;
unset($tids);
|
}
$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']);
| }
$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']);
|
Zeile 179 | 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 195 | Zeile 214 |
---|
$errors = array(); $customthreadtools = "";
|
$errors = array(); $customthreadtools = "";
|
$allowed_types = array('openclosethread', 'softdeleterestorethread', 'deletethread', 'move', 'stick', 'merge', 'removeredirects', 'removesubscriptions', 'approveunapprovethread');
| $allowed_types = array('move', 'merge', 'removeredirects', 'removesubscriptions');
|
|
|
$mybb->input['type'] = $mybb->get_input('type');
switch($db->type)
| if(is_moderator($fid, "canopenclosethreads"))
|
{
|
{
|
case "pgsql": case "sqlite": $query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'"); break; default: $query = $db->simple_select("modtools", 'tid, name', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'");
| $allowed_types[] = "openclosethread"; }
if(is_moderator($fid, "cansoftdeletethreads") || is_moderator($fid, "canrestorethreads")) { $allowed_types[] = "softdeleterestorethread"; }
if(is_moderator($fid, "candeletethreads")) { $allowed_types[] = "deletethread"; }
if(is_moderator($fid, "canstickunstickthreads")) { $allowed_types[] = "stick"; }
if(is_moderator($fid, "canapproveunapprovethreads")) { $allowed_types[] = "approveunapprovethread";
|
}
|
}
|
while($tool = $db->fetch_array($query)) { $allowed_types[] = "modtool_".$tool['tid'];
$tool['name'] = htmlspecialchars_uni($tool['name']);
$checked = ""; if($mybb->input['type'] == "modtool_".$tool['tid']) { $checked = "checked=\"checked\""; }
| |
|
|
eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";");
| $mybb->input['type'] = $mybb->get_input('type');
if(is_moderator($fid, "canusecustomtools")) { switch($db->type) { case "pgsql": case "sqlite": $query = $db->simple_select("modtools", 'tid, name, `groups`', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'"); break; default: $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)) { if(is_member($tool['groups'])) { $allowed_types[] = "modtool_".$tool['tid'];
$tool['name'] = htmlspecialchars_uni($tool['name']);
$checked = ""; if($mybb->input['type'] == "modtool_".$tool['tid']) { $checked = "checked=\"checked\""; }
eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";"); } }
|
}
$mybb->input['delayedmoderation'] = $mybb->get_input('delayedmoderation', MyBB::INPUT_ARRAY);
| }
$mybb->input['delayedmoderation'] = $mybb->get_input('delayedmoderation', MyBB::INPUT_ARRAY);
|
Zeile 231 | Zeile 281 |
---|
{ $mybb->input['type'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_type;
|
{ $mybb->input['type'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_type;
|
}
| }
|
if($mybb->input['type'] == 'move' && (!isset($mybb->input['delayedmoderation']['method']) || !in_array($mybb->input['delayedmoderation']['method'], array('move', 'redirect', 'copy')))) { $mybb->input['delayedmoderation']['method'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_method;
|
if($mybb->input['type'] == 'move' && (!isset($mybb->input['delayedmoderation']['method']) || !in_array($mybb->input['delayedmoderation']['method'], array('move', 'redirect', 'copy')))) { $mybb->input['delayedmoderation']['method'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_method;
|
}
| }
|
if($mybb->input['type'] == 'move') {
|
if($mybb->input['type'] == 'move') {
|
$newforum = get_forum($fid);
| $newfid = (int)$mybb->input['delayedmoderation']['new_forum'];
// Make sure moderator has permission to move to the new forum $newperms = forum_permissions($newfid); if($newperms['canview'] == 0 || !is_moderator($newfid, 'canmovetononmodforum')) { $errors[] = $lang->error_movetononmodforum; }
$newforum = get_forum($newfid);
|
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') { $errors[] = $lang->error_invalidforum;
|
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') { $errors[] = $lang->error_invalidforum;
|
| }
$method = $mybb->input['delayedmoderation']['method']; if($method != "copy" && $fid == $newfid) { $errors[] = $lang->error_movetosameforum;
|
} }
| } }
|
Zeile 261 | Zeile 326 |
---|
if($mybb->input['date_year'] < gmdate('Y', TIME_NOW + $localized_time_offset)) { $errors[] = $lang->error_delayedmoderation_invalid_date_year;
|
if($mybb->input['date_year'] < gmdate('Y', TIME_NOW + $localized_time_offset)) { $errors[] = $lang->error_delayedmoderation_invalid_date_year;
|
}
| }
|
$date_time = explode(' ', $mybb->get_input('date_time')); $date_time = explode(':', (string)$date_time[0]);
| $date_time = explode(' ', $mybb->get_input('date_time')); $date_time = explode(':', (string)$date_time[0]);
|
Zeile 280 | Zeile 345 |
---|
if(!$errors) { if(is_array($mybb->input['tids']))
|
if(!$errors) { if(is_array($mybb->input['tids']))
|
{ $mybb->input['tids'] = implode(',' , $mybb->input['tids']); }
| { $mybb->input['tids'] = implode(',', $mybb->input['tids']); }
|
$did = $db->insert_query("delayedmoderation", array( 'type' => $db->escape_string($mybb->input['type']),
| $did = $db->insert_query("delayedmoderation", array( 'type' => $db->escape_string($mybb->input['type']),
|
Zeile 300 | Zeile 365 |
---|
$lang->redirect_delayed_moderation_thread = $lang->sprintf($lang->redirect_delayed_moderation_thread, $rundate_format);
if(!empty($mybb->input['tid']))
|
$lang->redirect_delayed_moderation_thread = $lang->sprintf($lang->redirect_delayed_moderation_thread, $rundate_format);
if(!empty($mybb->input['tid']))
|
{
| {
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_delayed_moderation_thread); } else { if($mybb->get_input('inlinetype') == 'search')
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_delayed_moderation_thread); } else { if($mybb->get_input('inlinetype') == 'search')
|
{
| {
|
moderation_redirect(get_forum_link($fid), $lang->sprintf($lang->redirect_delayed_moderation_search, $rundate_format)); } else { moderation_redirect(get_forum_link($fid), $lang->sprintf($lang->redirect_delayed_moderation_forum, $rundate_format));
|
moderation_redirect(get_forum_link($fid), $lang->sprintf($lang->redirect_delayed_moderation_search, $rundate_format)); } else { moderation_redirect(get_forum_link($fid), $lang->sprintf($lang->redirect_delayed_moderation_forum, $rundate_format));
|
}
| }
|
} } else
| } } else
|
Zeile 410 | Zeile 475 |
---|
else { $tids = getids($fid, "forum");
|
else { $tids = getids($fid, "forum");
|
}
| }
|
$where_array = array(); switch($db->type) {
| $where_array = array(); switch($db->type) {
|
Zeile 480 | Zeile 545 |
---|
$delayed_thread = get_thread($delayedmod['tids']); $delayed_thread['link'] = get_thread_link($delayed_thread['tid']); $delayed_thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($delayed_thread['subject']));
|
$delayed_thread = get_thread($delayedmod['tids']); $delayed_thread['link'] = get_thread_link($delayed_thread['tid']); $delayed_thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($delayed_thread['subject']));
|
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_single")."\";"); } else { eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_multiple")."\";"); }
if($delayedmod['fname']) { $delayedmod['link'] = get_forum_link($delayedmod['fid']); $delayedmod['fname'] = htmlspecialchars_uni($delayedmod['fname']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_forum")."\";"); } $delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);
if($delayedmod['type'] == 'move') { $delayedmod['link'] = get_forum_link($delayedmod['inputs']['new_forum']); $delayedmod['name'] = htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_new_forum")."\";");
if($delayedmod['inputs']['method'] == "redirect") { if((int)$delayedmod['inputs']['redirect_expire'] == 0) { $redirect_expire_bit = $lang->redirect_forever; } else {
| eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_single")."\";"); } else { eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_multiple")."\";"); }
if($delayedmod['fname']) { $delayedmod['link'] = get_forum_link($delayedmod['fid']); $delayedmod['fname'] = htmlspecialchars_uni($delayedmod['fname']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_forum")."\";"); } $delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);
if($delayedmod['type'] == 'move') { $delayedmod['link'] = get_forum_link($delayedmod['inputs']['new_forum']); $delayedmod['name'] = htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_new_forum")."\";");
if($delayedmod['inputs']['method'] == "redirect") { if((int)$delayedmod['inputs']['redirect_expire'] == 0) { $redirect_expire_bit = $lang->redirect_forever; } else {
|
$redirect_expire_bit = (int)$delayedmod['inputs']['redirect_expire']." {$lang->days}"; }
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";"); }
|
$redirect_expire_bit = (int)$delayedmod['inputs']['redirect_expire']." {$lang->days}"; }
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']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_merge")."\";");
| $delayedmod['subject'] = htmlspecialchars_uni($delayedmod['inputs']['subject']); $delayedmod['threadurl'] = htmlspecialchars_uni($delayedmod['inputs']['threadurl']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_merge")."\";");
|
Zeile 536 | Zeile 601 |
---|
{ $lang->threads = $lang->thread; $thread['link'] = get_thread_link($tid);
|
{ $lang->threads = $lang->thread; $thread['link'] = get_thread_link($tid);
|
| $delayedmoderation_subject = $mybb->input['delayedmoderation']['subject']; $delayedmoderation_threadurl = $mybb->input['delayedmoderation']['threadurl'];
|
eval("\$threads = \"".$templates->get("moderation_delayedmoderation_thread")."\";"); eval("\$moderation_delayedmoderation_merge = \"".$templates->get("moderation_delayedmoderation_merge")."\";"); }
| eval("\$threads = \"".$templates->get("moderation_delayedmoderation_thread")."\";"); eval("\$moderation_delayedmoderation_merge = \"".$templates->get("moderation_delayedmoderation_merge")."\";"); }
|
Zeile 552 | 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)); $moderation_delayedmoderation_merge = ''; }
|
}
$threads = $lang->sprintf($lang->threads_selected, count($tids)); $moderation_delayedmoderation_merge = ''; }
|
$mybb->input['redirect_expire'] = $mybb->get_input('redirect_expire');
| $redirect_expire = $mybb->get_input('redirect_expire');
|
eval("\$moderation_delayedmoderation_move = \"".$templates->get("moderation_delayedmoderation_move")."\";");
|
eval("\$moderation_delayedmoderation_move = \"".$templates->get("moderation_delayedmoderation_move")."\";");
|
|
|
// Generate form elements for date form $dateday = ''; for($day = 1; $day <= 31; ++$day) { $selected = ''; if($mybb->get_input('date_day', MyBB::INPUT_INT) == $day)
|
// Generate form elements for date form $dateday = ''; for($day = 1; $day <= 31; ++$day) { $selected = ''; if($mybb->get_input('date_day', MyBB::INPUT_INT) == $day)
|
{
| {
|
$selected = ' selected="selected"'; } eval('$dateday .= "'.$templates->get('moderation_delayedmoderation_date_day').'";');
| $selected = ' selected="selected"'; } eval('$dateday .= "'.$templates->get('moderation_delayedmoderation_date_day').'";');
|
Zeile 585 | Zeile 652 |
---|
eval('$datemonth = "'.$templates->get('moderation_delayedmoderation_date_month').'";');
|
eval('$datemonth = "'.$templates->get('moderation_delayedmoderation_date_month').'";');
|
|
|
$dateyear = gmdate('Y', TIME_NOW + $localized_time_offset); $datetime = gmdate($mybb->settings['timeformat'], TIME_NOW + $localized_time_offset);
|
$dateyear = gmdate('Y', TIME_NOW + $localized_time_offset); $datetime = gmdate($mybb->settings['timeformat'], TIME_NOW + $localized_time_offset);
|
| $openclosethread = ''; if(is_moderator($fid, "canopenclosethreads")) { eval('$openclosethread = "'.$templates->get('moderation_delayedmoderation_openclose').'";'); }
$softdeleterestorethread = ''; if(is_moderator($fid, "cansoftdeletethreads") || is_moderator($fid, "canrestorethreads")) { eval('$softdeleterestorethread = "'.$templates->get('moderation_delayedmoderation_softdeleterestore').'";'); }
$deletethread = ''; if(is_moderator($fid, "candeletethreads")) { eval('$deletethread = "'.$templates->get('moderation_delayedmoderation_delete').'";'); }
$stickunstickthread = ''; if(is_moderator($fid, "canstickunstickthreads")) { eval('$stickunstickthread = "'.$templates->get('moderation_delayedmoderation_stick').'";'); }
$approveunapprovethread = ''; if(is_moderator($fid, "canapproveunapprovethreads")) { eval('$approveunapprovethread = "'.$templates->get('moderation_delayedmoderation_approve').'";'); }
|
$plugins->run_hooks("moderation_delayedmoderation");
| $plugins->run_hooks("moderation_delayedmoderation");
|
Zeile 602 | 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 609 | Zeile 711 |
---|
$openclose = $lang->opened; $redirect = $lang->redirect_openthread; $moderation->open_threads($tid);
|
$openclose = $lang->opened; $redirect = $lang->redirect_openthread; $moderation->open_threads($tid);
|
}
| }
|
else { $openclose = $lang->closed; $redirect = $lang->redirect_closethread; $moderation->close_threads($tid);
|
else { $openclose = $lang->closed; $redirect = $lang->redirect_closethread; $moderation->close_threads($tid);
|
}
$lang->mod_process = $lang->sprintf($lang->mod_process, $openclose);
log_moderator_action($modlogdata, $lang->mod_process);
moderation_redirect(get_thread_link($thread['tid']), $redirect); break;
| }
$lang->mod_process = $lang->sprintf($lang->mod_process, $openclose);
log_moderator_action($modlogdata, $lang->mod_process);
moderation_redirect(get_thread_link($thread['tid']), $redirect); break;
|
// Stick or unstick that post to the top bab! case "stick": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
// Stick or unstick that post to the top bab! case "stick": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
|
|
if(!is_moderator($fid, "canstickunstickthreads")) { error_no_permission();
|
if(!is_moderator($fid, "canstickunstickthreads")) { error_no_permission();
|
}
$plugins->run_hooks("moderation_stick");
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
$plugins->run_hooks("moderation_stick");
|
if($thread['sticky'] == 1) {
| if($thread['sticky'] == 1) {
|
Zeile 652 | Zeile 759 |
---|
$lang->mod_process = $lang->sprintf($lang->mod_process, $stuckunstuck);
log_moderator_action($modlogdata, $lang->mod_process);
|
$lang->mod_process = $lang->sprintf($lang->mod_process, $stuckunstuck);
log_moderator_action($modlogdata, $lang->mod_process);
|
|
|
moderation_redirect(get_thread_link($thread['tid']), $redirect); break;
// Remove redirects to a specific thread case "removeredirects":
|
moderation_redirect(get_thread_link($thread['tid']), $redirect); break;
// Remove redirects to a specific thread case "removeredirects":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads"))
|
// Verify incoming POST request 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_removeredirects");
$moderation->remove_redirects($tid);
| $plugins->run_hooks("moderation_removeredirects");
$moderation->remove_redirects($tid);
|
Zeile 677 | Zeile 789 |
---|
// Delete thread confirmation page case "deletethread":
|
// Delete thread confirmation page case "deletethread":
|
|
|
add_breadcrumb($lang->nav_deletethread);
if(!is_moderator($fid, "candeletethreads"))
| add_breadcrumb($lang->nav_deletethread);
if(!is_moderator($fid, "candeletethreads"))
|
Zeile 688 | Zeile 800 |
---|
} }
|
} }
|
$plugins->run_hooks("moderation_deletethread");
eval("\$deletethread = \"".$templates->get("moderation_deletethread")."\";"); output_page($deletethread); break;
// Delete the actual thread here case "do_deletethread":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
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); break;
// Delete the actual thread here case "do_deletethread":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "candeletethreads")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); } }
|
$plugins->run_hooks("moderation_do_deletethread");
// Log the subject of the deleted thread
| $plugins->run_hooks("moderation_do_deletethread");
// Log the subject of the deleted thread
|
Zeile 726 | 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'])
|
Zeile 741 | Zeile 853 |
---|
$poll = $db->fetch_array($query); if(!$poll) {
|
$poll = $db->fetch_array($query); if(!$poll) {
|
error($lang->error_invalidpoll);
| error($lang->error_invalidpoll, $lang->error);
|
}
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";");
| }
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";");
|
Zeile 753 | 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']) { error_no_permission(); }
|
if(!is_moderator($fid, "canmanagepolls")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid']) { error_no_permission(); }
|
}
| }
|
$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); }
| { error($lang->error_invalidpoll, $lang->error); }
|
$plugins->run_hooks("moderation_do_deletepoll");
$lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']);
| $plugins->run_hooks("moderation_do_deletepoll");
$lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']);
|
Zeile 789 | Zeile 906 |
---|
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(); }
|
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");
|
|
|
$lang->thread_approved = $lang->sprintf($lang->thread_approved, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_approved);
| $lang->thread_approved = $lang->sprintf($lang->thread_approved, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_approved);
|
Zeile 806 | Zeile 929 |
---|
// Unapprove a thread case "unapprovethread":
|
// Unapprove a thread case "unapprovethread":
|
// Verify incoming POST request
| // Verify incoming POST request
|
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']); log_moderator_action($modlogdata, $lang->thread_unapproved);
|
$plugins->run_hooks("moderation_unapprovethread");
$lang->thread_unapproved = $lang->sprintf($lang->thread_unapproved, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_unapproved);
|
|
|
$moderation->unapprove_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
| $moderation->unapprove_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
|
Zeile 844 | Zeile 973 |
---|
log_moderator_action($modlogdata, $lang->thread_restored);
$moderation->restore_threads($tid);
|
log_moderator_action($modlogdata, $lang->thread_restored);
$moderation->restore_threads($tid);
|
|
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored); break;
// Soft delete a thread case "softdeletethread":
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored); break;
// Soft delete a thread case "softdeletethread":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "cansoftdeletethreads"))
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "cansoftdeletethreads"))
|
{ error_no_permission();
| { error_no_permission();
|
} $thread = get_thread($tid);
| } $thread = get_thread($tid);
|
Zeile 868 | Zeile 997 |
---|
$moderation->soft_delete_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadsoftdeleted);
|
$moderation->soft_delete_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadsoftdeleted);
|
break;
| break;
|
// 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");
| }
$plugins->run_hooks("moderation_move");
|
Zeile 887 | 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'));
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); $method = $mybb->get_input('method');
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); $method = $mybb->get_input('method');
|
|
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
|
if(!is_moderator($fid, "canmanagethreads")) { 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(); }
|
| if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
$newperms = forum_permissions($moveto); if($newperms['canview'] == 0 && !is_moderator($fid, "canmovetononmodforum"))
|
$newperms = forum_permissions($moveto); if($newperms['canview'] == 0 && !is_moderator($fid, "canmovetononmodforum"))
|
{ error_no_permission();
| { 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); } if($method != "copy" && $thread['fid'] == $moveto) { error($lang->error_movetosameforum);
| error($lang->error_invalidforum, $lang->error);
|
}
|
}
|
| if($method != "copy" && $thread['fid'] == $moveto) { error($lang->error_movetosameforum, $lang->error); }
|
$plugins->run_hooks('moderation_do_move');
$expire = 0; if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0)
|
$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 = TIME_NOW + ($mybb->get_input('redirect_expire', MyBB::INPUT_INT) * 86400);
|
}
$the_thread = $tid;
| }
$the_thread = $tid;
|
$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);
switch($method)
| $newtid = $moderation->move_thread($tid, $moveto, $method, $expire);
switch($method)
|
Zeile 949 | Zeile 1090 |
---|
// Viewing thread notes case "viewthreadnotes": if(!is_moderator($fid))
|
// Viewing thread notes case "viewthreadnotes": if(!is_moderator($fid))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
// 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 1038 | Zeile 1179 |
---|
'removeredirects' => $lang->remove_redirects, 'removesubscriptions' => $lang->remove_subscriptions, 'approveunapprovethread' => $lang->approve_unapprove_thread
|
'removeredirects' => $lang->remove_redirects, 'removesubscriptions' => $lang->remove_subscriptions, 'approveunapprovethread' => $lang->approve_unapprove_thread
|
);
switch($db->type) { case "pgsql":
| );
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'"); break;
| case "sqlite": $query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'"); break;
|
Zeile 1129 | 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 1176 | Zeile 1317 |
---|
case "getip": add_breadcrumb($lang->nav_getip); if(!is_moderator($fid, "canviewips"))
|
case "getip": add_breadcrumb($lang->nav_getip); if(!is_moderator($fid, "canviewips"))
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
| }
|
$post['ipaddress'] = my_inet_ntop($db->unescape_binary($post['ipaddress'])); $hostname = @gethostbyaddr($post['ipaddress']); if(!$hostname || $hostname == $post['ipaddress']) { $hostname = $lang->resolve_fail;
|
$post['ipaddress'] = my_inet_ntop($db->unescape_binary($post['ipaddress'])); $hostname = @gethostbyaddr($post['ipaddress']); if(!$hostname || $hostname == $post['ipaddress']) { $hostname = $lang->resolve_fail;
|
}
| }
|
$post['username'] = htmlspecialchars_uni($post['username']); $username = build_profile_link($post['username'], $post['uid']);
| $post['username'] = htmlspecialchars_uni($post['username']); $username = build_profile_link($post['username'], $post['uid']);
|
Zeile 1196 | Zeile 1337 |
---|
{ $ipaddress = $post['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
|
{ $ipaddress = $post['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
|
}
| }
|
$plugins->run_hooks('moderation_getip');
|
$plugins->run_hooks('moderation_getip');
|
eval("\$getip = \"".$templates->get("moderation_getip")."\";"); output_page($getip); break;
| if($modal) { eval("\$getip = \"".$templates->get("moderation_getip_modal", 1, 0)."\";"); echo $getip; exit; } else { eval("\$getip = \"".$templates->get("moderation_getip")."\";"); output_page($getip); break; }
|
// Let's look up the ip address of a PM case "getpmip": if($pmid <= 0) {
|
// Let's look up the ip address of a PM case "getpmip": if($pmid <= 0) {
|
error($lang->error_invalidpm);
| 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 1239 | Zeile 1389 |
---|
$plugins->run_hooks('moderation_getpmip');
|
$plugins->run_hooks('moderation_getpmip');
|
eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";"); output_page($getpmip); break;
| if($modal) { eval("\$getpmip = \"".$templates->get("moderation_getpmip_modal", 1, 0)."\";"); echo $getpmip; exit; } else { eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";"); output_page($getpmip); break; }
|
// Merge threads case "merge": add_breadcrumb($lang->nav_merge);
|
// Merge threads case "merge": add_breadcrumb($lang->nav_merge);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
$plugins->run_hooks("moderation_merge");
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
$plugins->run_hooks("moderation_merge");
|
eval("\$merge = \"".$templates->get("moderation_merge")."\";"); output_page($merge); break;
// Let's get those threads together baby! (Merge threads) case "do_merge":
|
eval("\$merge = \"".$templates->get("moderation_merge")."\";"); output_page($merge); break;
// 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(); }
$plugins->run_hooks("moderation_do_merge");
// explode at # sign in a url (indicates a name reference) and reassign to the url $realurl = explode("#", $mybb->get_input('threadurl')); $mybb->input['threadurl'] = $realurl[0];
// Are we using an SEO URL? if(substr($mybb->input['threadurl'], -4) == "html") { // Get thread to merge's tid the SEO way preg_match("#thread-([0-9]+)?#i", $mybb->input['threadurl'], $threadmatch); preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
if($threadmatch[1]) { $parameters['tid'] = $threadmatch[1]; }
if($postmatch[1]) { $parameters['pid'] = $postmatch[1]; } } else { // Get thread to merge's tid the normal way $splitloc = explode(".php", $mybb->input['threadurl']); $temp = explode("&", my_substr($splitloc[1], 1));
if(!empty($temp)) { for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2); $parameters[$temp2[0]] = $temp2[1]; } } else {
| // 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");
// explode at # sign in a url (indicates a name reference) and reassign to the url $realurl = explode("#", $mybb->get_input('threadurl')); $mybb->input['threadurl'] = $realurl[0];
// Are we using an SEO URL? if(substr($mybb->input['threadurl'], -4) == "html") { // Get thread to merge's tid the SEO way preg_match("#thread-([0-9]+)?#i", $mybb->input['threadurl'], $threadmatch); preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
if($threadmatch[1]) { $parameters['tid'] = $threadmatch[1]; }
if($postmatch[1]) { $parameters['pid'] = $postmatch[1]; } } else { // Get thread to merge's tid the normal way $splitloc = explode(".php", $mybb->input['threadurl']); $temp = explode("&", my_substr($splitloc[1], 1));
if(!empty($temp)) { for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2); $parameters[$temp2[0]] = $temp2[1]; } } else {
|
$temp2 = explode("=", $splitloc[1], 2); $parameters[$temp2[0]] = $temp2[1]; } }
if(!empty($parameters['pid']) && empty($parameters['tid']))
|
$temp2 = explode("=", $splitloc[1], 2); $parameters[$temp2[0]] = $temp2[1]; } }
if(!empty($parameters['pid']) && empty($parameters['tid']))
|
{
| {
|
$post = get_post($parameters['pid']); $mergetid = (int)$post['tid']; }
| $post = get_post($parameters['pid']); $mergetid = (int)$post['tid']; }
|
Zeile 1328 | 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")) { error_no_permission(); } if(isset($mybb->input['subject']))
|
if(!is_moderator($mergethread['fid'], "canmanagethreads")) { error_no_permission(); } if(isset($mybb->input['subject']))
|
{
| {
|
$subject = $mybb->get_input('subject'); } else
| $subject = $mybb->get_input('subject'); } else
|
Zeile 1357 | Zeile 1526 |
---|
// 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);
|
if(!is_moderator($fid, "canmanagethreads")) {
| if(!is_moderator($fid, "canmanagethreads")) {
|
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 1368 | 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"; $posts = ''; while($post = $db->fetch_array($query))
| $altbg = "trow1"; $posts = ''; while($post = $db->fetch_array($query))
|
Zeile 1393 | Zeile 1569 |
---|
{ $parser_options['allow_smilies'] = 0; }
|
{ $parser_options['allow_smilies'] = 0; }
|
|
|
$message = $parser->parse_message($post['message'], $parser_options); eval("\$posts .= \"".$templates->get("moderation_split_post")."\";"); $altbg = alt_trow(); }
|
$message = $parser->parse_message($post['message'], $parser_options); eval("\$posts .= \"".$templates->get("moderation_split_post")."\";"); $altbg = alt_trow(); }
|
| clearinline($tid, 'thread');
|
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
$plugins->run_hooks("moderation_split");
| $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
$plugins->run_hooks("moderation_split");
|
Zeile 1415 | 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 1422 | 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 1449 | 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 1474 | Zeile 1657 |
---|
// Delete Thread Subscriptions case "removesubscriptions":
|
// Delete Thread Subscriptions case "removesubscriptions":
|
| // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
if(!is_moderator($fid, "canmanagethreads"))
|
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);
| log_moderator_action($modlogdata, $lang->removed_subscriptions);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_removed_subscriptions);
|
Zeile 1493 | Zeile 1685 |
---|
add_breadcrumb($lang->nav_multi_deletethreads);
if(!empty($mybb->input['searchid']))
|
add_breadcrumb($lang->nav_multi_deletethreads);
if(!empty($mybb->input['searchid']))
|
{
| {
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'candeletethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'candeletethreads'))
|
{ error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'candeletethreads')) { error_no_permission(); } } if(count($threads) < 1)
| { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'candeletethreads')) { error_no_permission(); } } if(count($threads) < 1)
|
{
|
{
|
error($lang->error_inline_nothreadsselected);
| error($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');
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 1529 | Zeile 1721 |
---|
break;
// Actually delete the threads - Inline moderation
|
break;
// Actually delete the threads - Inline moderation
|
case "do_multideletethreads":
| case "do_multideletethreads":
|
// 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 1547 | Zeile 1739 |
---|
} log_moderator_action($modlogdata, $lang->multi_deleted_threads); if($mybb->get_input('inlinetype') == 'search')
|
} log_moderator_action($modlogdata, $lang->multi_deleted_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 1559 | Zeile 1751 |
---|
break;
// Open threads - Inline moderation
|
break;
// Open threads - Inline moderation
|
case "multiopenthreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
| case "multiopenthreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid']))
|
{ // From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
|
{ // From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
|
{ error_no_permission(); } } else {
| { error_no_permission(); } } else {
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads')) {
| $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads')) {
|
Zeile 1583 | Zeile 1775 |
---|
}
if(count($threads) < 1)
|
}
if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
| { error($lang->error_inline_nothreadsselected, $lang->error); }
|
$moderation->open_threads($threads);
log_moderator_action($modlogdata, $lang->multi_opened_threads); if($mybb->get_input('inlinetype') == 'search')
|
$moderation->open_threads($threads);
log_moderator_action($modlogdata, $lang->multi_opened_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 1602 | Zeile 1794 |
---|
break;
// Close threads - Inline moderation
|
break;
// Close threads - Inline moderation
|
case "multiclosethreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->get_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->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($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsclosed); break;
// Approve threads - Inline moderation case "multiapprovethreads":
| 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 1653 | Zeile 1803 |
---|
{ // From search page $threads = getids($mybb->get_input('searchid'), 'search');
|
{ // From search page $threads = getids($mybb->get_input('searchid'), 'search');
|
if(!is_moderator_by_tids($threads, 'canapproveunapprovethreads'))
| 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, $lang->error); }
$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($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsclosed); break;
// Approve threads - Inline moderation case "multiapprovethreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canapproveunapprovethreads'))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 1668 | Zeile 1860 |
---|
} 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);
log_moderator_action($modlogdata, $lang->multi_approved_threads);
|
}
$moderation->approve_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_approved_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'); } $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved); break;
|
clearinline($fid, 'forum'); } $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved); break;
|
|
|
// Unapprove threads - Inline moderation case "multiunapprovethreads":
| // Unapprove threads - Inline moderation case "multiunapprovethreads":
|
Zeile 1705 | Zeile 1897 |
---|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads'))
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads'))
|
{ error_no_permission(); } } if(count($threads) < 1)
| { error_no_permission(); } } 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 1740 | 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
| } } else
|
Zeile 1754 | Zeile 1946 |
---|
} if(count($threads) < 1) {
|
} if(count($threads) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$moderation->restore_threads($threads);
log_moderator_action($modlogdata, $lang->multi_restored_threads);
|
}
$moderation->restore_threads($threads);
log_moderator_action($modlogdata, $lang->multi_restored_threads);
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else {
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else {
|
clearinline($fid, 'forum'); } $cache->update_stats();
| clearinline($fid, 'forum'); } $cache->update_stats();
|
Zeile 1783 | 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 1796 | 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);
log_moderator_action($modlogdata, $lang->multi_soft_deleted_threads);
|
$moderation->soft_delete_threads($threads);
log_moderator_action($modlogdata, $lang->multi_soft_deleted_threads);
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($fid, 'forum'); }
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($fid, 'forum'); }
|
$cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadssoftdeleted); break;
// Stick threads - Inline moderation case "multistickthreads":
|
$cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadssoftdeleted); break;
// Stick threads - Inline moderation case "multistickthreads":
|
|
|
// 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 1826 | 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(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1839 | 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);
| $moderation->stick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_stuck_threads);
|
Zeile 1858 | Zeile 2050 |
---|
break;
// Unstick threads - Inline moderaton
|
break;
// Unstick threads - Inline moderaton
|
case "multiunstickthreads":
// Verify incoming POST request
| case "multiunstickthreads":
// 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 1868 | Zeile 2060 |
---|
// 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')) { error_no_permission(); }
|
$threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads')) { error_no_permission(); }
|
}
| }
|
if(count($threads) < 1)
|
if(count($threads) < 1)
|
{ error($lang->error_inline_nothreadsselected); }
$moderation->unstick_threads($threads);
| { 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') {
| log_moderator_action($modlogdata, $lang->multi_unstuck_threads); if($mybb->get_input('inlinetype') == 'search') {
|
Zeile 1898 | Zeile 2090 |
---|
} moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunstuck); break;
|
} moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunstuck); break;
|
|
|
// Move threads - Inline moderation case "multimovethreads": add_breadcrumb($lang->nav_multi_movethreads);
| // Move threads - Inline moderation case "multimovethreads": add_breadcrumb($lang->nav_multi_movethreads);
|
Zeile 1908 | Zeile 2100 |
---|
// 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 1922 | Zeile 2114 |
---|
}
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 1942 | Zeile 2134 |
---|
// Actually move the threads in Inline moderation case "do_multimovethreads":
|
// Actually move the threads in Inline moderation case "do_multimovethreads":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
|
|
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);
|
$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 1960 | 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_no_permission(); }
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') { error($lang->error_invalidforum);
| error($lang->error_movetononmodforum, $lang->error);
|
}
|
}
|
$moderation->move_threads($tids, $moveto);
| $newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') { error($lang->error_invalidforum, $lang->error); }
$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);
|
moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved);
|
break;
| 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') {
| if($mybb->get_input('inlinetype') == 'search') {
|
$posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread');
|
$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, "candeleteposts"))
|
} if(!is_moderator_by_pids($posts, "candeleteposts"))
|
{
| {
|
error_no_permission(); } $inlineids = implode("|", $posts);
| error_no_permission(); } $inlineids = implode("|", $posts);
|
Zeile 2006 | Zeile 2209 |
---|
{ clearinline($tid, 'thread'); }
|
{ clearinline($tid, 'thread'); }
|
|
|
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
|
|
eval("\$multidelete = \"".$templates->get("moderation_inline_deleteposts")."\";"); output_page($multidelete);
|
eval("\$multidelete = \"".$templates->get("moderation_inline_deleteposts")."\";"); output_page($multidelete);
|
break;
| break;
|
// Actually delete the posts in inline moderation case "do_multideleteposts":
| // Actually delete the posts in inline moderation case "do_multideleteposts":
|
Zeile 2109 | Zeile 2312 |
---|
} // Remove the cookie once its data is retrieved my_unsetcookie($key);
|
} // Remove the cookie once its data is retrieved my_unsetcookie($key);
|
} }
if(empty($posts)) { error($lang->error_inline_nopostsselected);
| } }
if(empty($posts)) { error($lang->error_inline_nopostsselected, $lang->error);
|
}
if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission();
|
}
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 2151 | 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'); }
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
| }
$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'));
|
eval("\$multimerge = \"".$templates->get("moderation_inline_mergeposts")."\";"); output_page($multimerge);
| eval("\$multimerge = \"".$templates->get("moderation_inline_mergeposts")."\";"); output_page($multimerge);
|
Zeile 2178 | 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)
|
{
| {
|
$postlist[] = (int)$pid; }
| $postlist[] = (int)$pid; }
|
Zeile 2201 | Zeile 2404 |
---|
// Split posts - Inline moderation case "multisplitposts": add_breadcrumb($lang->nav_multi_splitposts);
|
// Split posts - Inline moderation case "multisplitposts": add_breadcrumb($lang->nav_multi_splitposts);
|
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); }
if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission(); } $posts = array_map('intval', $posts); $pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post // Select number of posts in each thread that the splitted post is in $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid "); $threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost); } $threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below }
// 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(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) AND q.pid NOT IN ($pidin) GROUP BY p.tid, p.pid "); $pcheck2 = array(); while($tcheck = $db->fetch_array($query)) { if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid']; } } if(count($pcheck2) != count($pcheck))
| if($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, "canmanagethreads")) { error_no_permission(); } $posts = array_map('intval', $posts); $pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post // Select number of posts in each thread that the splitted post is in $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid "); $threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost, $lang->error); } $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) $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) AND q.pid NOT IN ($pidin) GROUP BY p.tid, p.pid "); $pcheck2 = array(); while($tcheck = $db->fetch_array($query)) { if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid']; } } if(count($pcheck2) != count($pcheck))
|
{ // One or more threads do not have posts after splitting
|
{ // One or more threads do not have posts after splitting
|
error($lang->error_cantsplitall);
| error($lang->error_cantsplitall, $lang->error);
|
}
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search')
|
}
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search')
|
{
| {
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
}
| }
|
else { clearinline($tid, 'thread');
|
else { clearinline($tid, 'thread');
|
}
| }
|
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
| $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
Zeile 2291 | Zeile 2494 |
---|
$plist = array(); $postlist = explode("|", $mybb->get_input('posts')); foreach($postlist as $pid)
|
$plist = array(); $postlist = explode("|", $mybb->get_input('posts')); foreach($postlist as $pid)
|
{
| {
|
$pid = (int)$pid; $plist[] = $pid; }
if(!is_moderator_by_pids($plist, "canmanagethreads"))
|
$pid = (int)$pid; $plist[] = $pid; }
if(!is_moderator_by_pids($plist, "canmanagethreads"))
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 2309 | Zeile 2512 |
---|
while($pid = $db->fetch_field($query, 'pid')) { $posts[] = $pid;
|
while($pid = $db->fetch_field($query, 'pid')) { $posts[] = $pid;
|
}
| }
|
}
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 2333 | Zeile 2536 |
---|
{ if((int)$tcheck['count'] <= 1) {
|
{ 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 }
|
Zeile 2358 | 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']))
| }
if(isset($mybb->input['moveto']))
|
Zeile 2373 | Zeile 2576 |
---|
$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);
|
}
$newsubject = $mybb->get_input('newsubject');
| }
$newsubject = $mybb->get_input('newsubject');
|
Zeile 2401 | 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 2425 | 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 2450 | 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 2472 | Zeile 2675 |
---|
// 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'));
|
| $plugins->run_hooks("moderation_do_multimoveposts");
|
// explode at # sign in a url (indicates a name reference) and reassign to the url $realurl = explode("#", $mybb->get_input('threadurl')); $mybb->input['threadurl'] = $realurl[0];
|
// explode at # sign in a url (indicates a name reference) and reassign to the url $realurl = explode("#", $mybb->get_input('threadurl')); $mybb->input['threadurl'] = $realurl[0];
|
|
|
// Are we using an SEO URL? if(substr($mybb->input['threadurl'], -4) == "html") {
| // Are we using an SEO URL? if(substr($mybb->input['threadurl'], -4) == "html") {
|
Zeile 2501 | Zeile 2706 |
---|
$temp = explode("&", my_substr($splitloc[1], 1));
if(!empty($temp))
|
$temp = explode("&", my_substr($splitloc[1], 1));
if(!empty($temp))
|
{
| {
|
for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2);
| for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2);
|
Zeile 2511 | Zeile 2716 |
---|
else { $temp2 = explode("=", $splitloc[1], 2);
|
else { $temp2 = explode("=", $splitloc[1], 2);
|
$parameters[$temp2[0]] = $temp2[1]; } }
| $parameters[$temp2[0]] = $temp2[1]; } }
|
if(!empty($parameters['pid']) && empty($parameters['tid'])) { $query = $db->simple_select("posts", "tid", "pid='".(int)$parameters['pid']."'");
| if(!empty($parameters['pid']) && empty($parameters['tid'])) { $query = $db->simple_select("posts", "tid", "pid='".(int)$parameters['pid']."'");
|
Zeile 2532 | Zeile 2737 |
---|
$newtid = (int)$newtid; $newthread = get_thread($newtid); if(!$newthread)
|
$newtid = (int)$newtid; $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 2546 | Zeile 2751 |
---|
{ $pid = (int)$pid; $plist[] = $pid;
|
{ $pid = (int)$pid; $plist[] = $pid;
|
}
| }
|
if(!is_moderator_by_pids($plist, "canmanagethreads")) { error_no_permission();
| if(!is_moderator_by_pids($plist, "canmanagethreads")) { error_no_permission();
|
Zeile 2565 | Zeile 2770 |
---|
}
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 2585 | 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 2610 | 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 2638 | Zeile 2843 |
---|
} 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, "canapproveunapproveposts"))
| }
if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))
|
Zeile 2667 | 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')
| 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');
|
{ $posts = getids($mybb->get_input('searchid'), 'search');
|
} else {
| } else {
|
$posts = getids($tid, 'thread'); }
if(count($posts) < 1)
|
$posts = getids($tid, 'thread'); }
if(count($posts) < 1)
|
{ error($lang->error_inline_nopostsselected); }
| { error($lang->error_inline_nopostsselected, $lang->error); }
|
$pids = array();
if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))
| $pids = array();
if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))
|
Zeile 2694 | Zeile 2899 |
---|
foreach($posts as $pid) { $pids[] = (int)$pid;
|
foreach($posts as $pid) { $pids[] = (int)$pid;
|
}
| }
|
$moderation->unapprove_posts($pids);
log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
|
$moderation->unapprove_posts($pids);
log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
|
if($mybb->get_input('inlinetype') == 'search') {
| if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
Zeile 2711 | 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') {
| 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($mybb->get_input('searchid'), 'search'); } else
|
Zeile 2726 | Zeile 2931 |
---|
} 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"))
|
Zeile 2743 | Zeile 2948 |
---|
$moderation->restore_posts($pids);
log_moderator_action($modlogdata, $lang->multi_restore_posts);
|
$moderation->restore_posts($pids);
log_moderator_action($modlogdata, $lang->multi_restore_posts);
|
if($mybb->get_input('inlinetype') == 'search')
| if($mybb->get_input('inlinetype') == 'search')
|
{ clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); }
| { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); }
|
Zeile 2764 | Zeile 2969 |
---|
$posts = getids($mybb->get_input('searchid'), 'search'); } else
|
$posts = getids($mybb->get_input('searchid'), 'search'); } else
|
{ $posts = getids($tid, 'thread'); }
| { $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 2801 | Zeile 3006 |
---|
require_once MYBB_ROOT."inc/functions_user.php";
$groups = explode(",", $mybb->settings['purgespammergroups']);
|
require_once MYBB_ROOT."inc/functions_user.php";
$groups = explode(",", $mybb->settings['purgespammergroups']);
|
if(!in_array($mybb->user['usergroup'], $groups))
| if(!is_member($groups))
|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
$uid = $mybb->input['uid'];
| $uid = $mybb->get_input('uid', MyBB::INPUT_INT);
|
$user = get_user($uid); if(!$user['uid'] || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid'])) {
| $user = get_user($uid); if(!$user['uid'] || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid'])) {
|
Zeile 2905 | 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 2918 | Zeile 3123 |
---|
else { $lang->purgespammer_purge_desc = $lang->sprintf($lang->purgespammer_purge_desc, $lang->purgespammer_delete);
|
else { $lang->purgespammer_purge_desc = $lang->sprintf($lang->purgespammer_purge_desc, $lang->purgespammer_delete);
|
}
| }
|
eval("\$purgespammer = \"".$templates->get('moderation_purgespammer')."\";"); output_page($purgespammer); }
| eval("\$purgespammer = \"".$templates->get('moderation_purgespammer')."\";"); output_page($purgespammer); }
|
Zeile 2937 | 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'])) { add_breadcrumb($lang->confirm_execute_tool);
|
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']));
|
$lang->confirm_execute_tool_desc = $lang->sprintf($lang->confirm_execute_tool_desc, htmlspecialchars_uni($tool['name']));
|
| $action = $mybb->input['action'];
|
$modtype = $mybb->get_input('modtype'); $inlinetype = $mybb->get_input('inlinetype'); $searchid = $mybb->get_input('searchid');
| $modtype = $mybb->get_input('modtype'); $inlinetype = $mybb->get_input('inlinetype'); $searchid = $mybb->get_input('searchid');
|
Zeile 2956 | Zeile 3167 |
---|
output_page($page); exit; }
|
output_page($page); exit; }
|
| $tool['name'] = htmlspecialchars_uni($tool['name']);
|
if($tool['type'] == 't' && $mybb->get_input('modtype') == 'inlinethread') {
| if($tool['type'] == 't' && $mybb->get_input('modtype') == 'inlinethread') {
|
Zeile 2969 | Zeile 3182 |
---|
} if(count($tids) < 1) {
|
} if(count($tids) < 1) {
|
error($lang->error_inline_nopostsselected);
| error($lang->error_inline_nopostsselected, $lang->error);
|
} if(!is_moderator_by_tids($tids, "canusecustomtools")) {
| } if(!is_moderator_by_tids($tids, "canusecustomtools")) {
|
Zeile 2979 | Zeile 3192 |
---|
$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);
|
}
$custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids);
| }
$custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids);
|
Zeile 2990 | Zeile 3203 |
---|
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 3010 | Zeile 3223 |
---|
$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 3020 | 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 { $lang->redirect_customtool_thread = $lang->sprintf($lang->redirect_customtool_thread, $tool['name']);
| else { $lang->redirect_customtool_thread = $lang->sprintf($lang->redirect_customtool_thread, $tool['name']);
|
Zeile 3033 | Zeile 3246 |
---|
if($mybb->get_input('inlinetype') == 'search') { $pids = getids($mybb->get_input('searchid'), 'search');
|
if($mybb->get_input('inlinetype') == 'search') { $pids = getids($mybb->get_input('searchid'), 'search');
|
}
| }
|
else { $pids = getids($tid, 'thread'); }
if(count($pids) < 1)
|
else { $pids = getids($tid, 'thread'); }
if(count($pids) < 1)
|
{ error($lang->error_inline_nopostsselected); } if(!is_moderator_by_pids($pids, "canusecustomtools")) { error_no_permission(); }
| { error($lang->error_inline_nopostsselected, $lang->error); } if(!is_moderator_by_pids($pids, "canusecustomtools")) { error_no_permission(); }
|
// Get threads which are associated with the posts $tids = array();
| // Get threads which are associated with the posts $tids = array();
|
Zeile 3058 | Zeile 3271 |
---|
while($row = $db->fetch_array($query)) { $tids[] = $row['tid'];
|
while($row = $db->fetch_array($query)) { $tids[] = $row['tid'];
|
}
| }
|
$ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids, $pids); $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
| $ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids, $pids); $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
|
Zeile 3068 | Zeile 3281 |
---|
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
|
{
| {
|
clearinline($tid, 'thread'); if($ret == 'forum') {
| clearinline($tid, 'thread'); if($ret == 'forum') {
|
Zeile 3084 | Zeile 3297 |
---|
moderation_redirect(get_thread_link($tid), $lang->redirect_customtool_thread); } }
|
moderation_redirect(get_thread_link($tid), $lang->redirect_customtool_thread); } }
|
|
|
break; } }
| break; } }
|
Zeile 3120 | Zeile 3333 |
---|
if($cookie_id == 'ALL') { $newids += getallids($id, $type);
|
if($cookie_id == 'ALL') { $newids += getallids($id, $type);
|
}
| }
|
else { $newids[] = (int)$cookie_id;
|
else { $newids[] = (int)$cookie_id;
|
} }
| } }
|
}
return $newids;
| }
return $newids;
|
Zeile 3149 | 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 3168 | Zeile 3381 |
---|
}
$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);
| { $query = $db->simple_select("searchlog", "resulttype, posts, threads", "sid='".$db->escape_string($id)."' AND uid='{$mybb->user['uid']}'", 1); $searchlog = $db->fetch_array($query);
|
Zeile 3317 | 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); }
|