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($mybb->user['uid'] == 0) { error_no_permission(); }
|
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 61 |
---|
$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 86 |
---|
if(!$pm) {
|
if(!$pm) {
|
error($lang->error_invalidpm);
| error($lang->error_invalidpm, $lang->error);
|
} }
| } }
|
Zeile 106 | Zeile 114 |
---|
{ // 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']); eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");
$allowable_moderation_actions = array("getip", "getpmip", "cancel_delayedmoderation", "delayedmoderation", "threadnotes", "purgespammer", "viewthreadnotes");
|
}
$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']); eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");
$allowable_moderation_actions = array("getip", "getpmip", "cancel_delayedmoderation", "delayedmoderation", "threadnotes", "purgespammer", "viewthreadnotes");
|
|
|
if($mybb->request_method != "post" && !in_array($mybb->input['action'], $allowable_moderation_actions)) { error_no_permission();
| if($mybb->request_method != "post" && !in_array($mybb->input['action'], $allowable_moderation_actions)) { error_no_permission();
|
Zeile 128 | Zeile 153 |
---|
add_breadcrumb($lang->delayed_moderation); if(!is_moderator($fid, "canmanagethreads"))
|
add_breadcrumb($lang->delayed_moderation); if(!is_moderator($fid, "canmanagethreads"))
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 139 | Zeile 164 |
---|
if($tid == 0) { moderation_redirect(get_forum_link($fid), $lang->redirect_delayed_moderation_cancelled);
|
if($tid == 0) { moderation_redirect(get_forum_link($fid), $lang->redirect_delayed_moderation_cancelled);
|
} else
| } else
|
{ moderation_redirect("moderation.php?action=delayedmoderation&tid={$tid}&my_post_key={$mybb->post_code}", $lang->redirect_delayed_moderation_cancelled); }
| { moderation_redirect("moderation.php?action=delayedmoderation&tid={$tid}&my_post_key={$mybb->post_code}", $lang->redirect_delayed_moderation_cancelled); }
|
Zeile 153 | Zeile 178 |
---|
$localized_time_offset = $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
if(!$mybb->get_input('date_day', MyBB::INPUT_INT))
|
$localized_time_offset = $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
if(!$mybb->get_input('date_day', MyBB::INPUT_INT))
|
{
| {
|
$mybb->input['date_day'] = gmdate('d', TIME_NOW + $localized_time_offset); } if(!$mybb->get_input('date_month', MyBB::INPUT_INT)) { $mybb->input['date_month'] = gmdate('m', TIME_NOW + $localized_time_offset);
|
$mybb->input['date_day'] = gmdate('d', TIME_NOW + $localized_time_offset); } if(!$mybb->get_input('date_month', MyBB::INPUT_INT)) { $mybb->input['date_month'] = gmdate('m', TIME_NOW + $localized_time_offset);
|
}
| }
|
// Assume in-line moderation if TID is not set if(!empty($mybb->input['tid'])) { $mybb->input['tids'] = $tid;
|
// Assume in-line moderation if TID is not set if(!empty($mybb->input['tid'])) { $mybb->input['tids'] = $tid;
|
}
| }
|
else { if($mybb->get_input('inlinetype') == 'search')
| else { if($mybb->get_input('inlinetype') == 'search')
|
Zeile 179 | Zeile 204 |
---|
} 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 190 | Zeile 215 |
---|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
}
| }
|
$errors = array(); $customthreadtools = "";
|
$errors = array(); $customthreadtools = "";
|
$allowed_types = array('openclosethread', 'softdeleterestorethread', 'deletethread', 'move', 'stick', 'merge', 'removeredirects', 'removesubscriptions', 'approveunapprovethread');
$mybb->input['type'] = $mybb->get_input('type');
| $allowed_types = array('move', 'merge', 'removeredirects', 'removesubscriptions');
if(is_moderator($fid, "canopenclosethreads")) { $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"; }
|
|
|
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; default: $query = $db->simple_select("modtools", 'tid, name', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'"); } while($tool = $db->fetch_array($query))
| $mybb->input['type'] = $mybb->get_input('type');
if(is_moderator($fid, "canusecustomtools"))
|
{
|
{
|
$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")."\";"); }
| 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 241 | Zeile 297 |
---|
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;
|
} }
if($mybb->input['date_day'] > 31 || $mybb->input['date_day'] < 1)
| }
$method = $mybb->input['delayedmoderation']['method']; if($method != "copy" && $fid == $newfid) { $errors[] = $lang->error_movetosameforum; } }
if($mybb->input['date_day'] > 31 || $mybb->input['date_day'] < 1)
|
{ $errors[] = $lang->error_delayedmoderation_invalid_date_day; }
| { $errors[] = $lang->error_delayedmoderation_invalid_date_day; }
|
Zeile 281 | Zeile 352 |
---|
{ if(is_array($mybb->input['tids'])) {
|
{ 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(
| }
$did = $db->insert_query("delayedmoderation", array(
|
Zeile 355 | Zeile 426 |
---|
$method_selected = array('move' => 'checked="checked"', 'redirect' => '', 'copy' => '');
$mybb->input['delayedmoderation']['redirect_expire'] = '';
|
$method_selected = array('move' => 'checked="checked"', 'redirect' => '', 'copy' => '');
$mybb->input['delayedmoderation']['redirect_expire'] = '';
|
$mybb->input['delayedmoderation']['subject'] = $thread['subject'];
| $mybb->input['delayedmoderation']['subject'] = isset($thread['subject']) ? $thread['subject'] : '';
|
$mybb->input['delayedmoderation']['threadurl'] = '';
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "delayedmoderation[new_forum]");
| $mybb->input['delayedmoderation']['threadurl'] = '';
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "delayedmoderation[new_forum]");
|
Zeile 445 | Zeile 516 |
---|
{ case "pgsql": case "sqlite":
|
{ case "pgsql": case "sqlite":
|
$query = $db->query(" SELECT d.*, u.username, f.name AS fname FROM ".TABLE_PREFIX."delayedmoderation d LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid)
| $query = $db->query(" SELECT d.*, u.username, f.name AS fname FROM ".TABLE_PREFIX."delayedmoderation d 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
| WHERE ','||d.tids||',' LIKE '%,{$tid},%' ORDER BY d.dateline DESC LIMIT 0, 20
|
Zeile 467 | Zeile 538 |
---|
"); } }
|
"); } }
|
|
|
while($delayedmod = $db->fetch_array($query)) {
|
while($delayedmod = $db->fetch_array($query)) {
|
$delayedmod['dateline'] = my_date("jS M Y, {$mybb->settings['timeformat']}", $delayedmod['delaydateline']);
| $delayedmod['dateline'] = my_date('normal', $delayedmod['delaydateline'], "", 2);
|
$delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']];
| $delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']];
|
Zeile 488 | Zeile 559 |
---|
}
if($delayedmod['fname'])
|
}
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['link'] = get_forum_link($delayedmod['fid']); $delayedmod['fname'] = htmlspecialchars_uni($delayedmod['fname']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_forum")."\";");
|
Zeile 500 | Zeile 571 |
---|
$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")."\";");
|
$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)
| if($delayedmod['inputs']['method'] == "redirect") { if((int)$delayedmod['inputs']['redirect_expire'] == 0)
|
Zeile 515 | Zeile 586 |
---|
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']); 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")."\";");
|
}
| }
|
eval("\$delayedmods .= \"".$templates->get("moderation_delayedmodaction_notes")."\";"); $trow = alt_trow(); } if(!$delayedmods)
|
eval("\$delayedmods .= \"".$templates->get("moderation_delayedmodaction_notes")."\";"); $trow = alt_trow(); } if(!$delayedmods)
|
{
| {
|
$cols = 5; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";"); }
$url = ''; if($mybb->get_input('tid', MyBB::INPUT_INT))
|
$cols = 5; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";"); }
$url = ''; if($mybb->get_input('tid', MyBB::INPUT_INT))
|
{
| {
|
$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 545 | Zeile 618 |
---|
{ $tids = getids($mybb->get_input('searchid'), 'search'); $url = htmlspecialchars_uni($mybb->get_input('url'));
|
{ $tids = getids($mybb->get_input('searchid'), 'search'); $url = htmlspecialchars_uni($mybb->get_input('url'));
|
}
| }
|
else { $tids = getids($fid, "forum"); } if(count($tids) < 1)
|
else { $tids = getids($fid, "forum"); } 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)
| // Generate form elements for date form $dateday = ''; for($day = 1; $day <= 31; ++$day)
|
Zeile 571 | Zeile 644 |
---|
$selected = ' selected="selected"'; } eval('$dateday .= "'.$templates->get('moderation_delayedmoderation_date_day').'";');
|
$selected = ' selected="selected"'; } eval('$dateday .= "'.$templates->get('moderation_delayedmoderation_date_day').'";');
|
}
| }
|
$datemonth = array(); foreach(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12') as $month) {
| $datemonth = array(); foreach(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12') as $month) {
|
Zeile 585 | Zeile 658 |
---|
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 600 | Zeile 703 |
---|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canopenclosethreads"))
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canopenclosethreads"))
|
{ error_no_permission(); }
| { error_no_permission(); }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
|
if($thread['closed'] == 1) { $openclose = $lang->opened; $redirect = $lang->redirect_openthread; $moderation->open_threads($tid);
|
if($thread['closed'] == 1) { $openclose = $lang->opened; $redirect = $lang->redirect_openthread; $moderation->open_threads($tid);
|
} else
| } else
|
{ $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);
log_moderator_action($modlogdata, $lang->mod_process);
| $lang->mod_process = $lang->sprintf($lang->mod_process, $openclose);
log_moderator_action($modlogdata, $lang->mod_process);
|
Zeile 628 | Zeile 736 |
---|
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")) { 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 765 |
---|
$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;
|
moderation_redirect(get_thread_link($thread['tid']), $redirect); break;
|
|
|
// Remove redirects to a specific thread case "removeredirects":
|
// Remove redirects to a specific thread case "removeredirects":
|
// Verify incoming POST request
| // Verify incoming POST request
|
verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
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_removeredirects");
| $plugins->run_hooks("moderation_removeredirects");
|
Zeile 677 | Zeile 795 |
---|
// 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 696 | Zeile 814 |
---|
// Delete the actual thread here case "do_deletethread":
|
// 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"))
|
// 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(); } }
| { 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 $modlogdata['thread_subject'] = $thread['subject'];
|
$plugins->run_hooks("moderation_do_deletethread");
// Log the subject of the deleted thread $modlogdata['thread_subject'] = $thread['subject'];
|
|
|
$thread['subject'] = $db->escape_string($thread['subject']); $lang->thread_deleted = $lang->sprintf($lang->thread_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_deleted);
|
$thread['subject'] = $db->escape_string($thread['subject']); $lang->thread_deleted = $lang->sprintf($lang->thread_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_deleted);
|
|
|
$moderation->delete_thread($tid);
|
$moderation->delete_thread($tid);
|
|
|
mark_reports($tid, "thread"); moderation_redirect(get_forum_link($fid), $lang->redirect_threaddeleted); break;
| mark_reports($tid, "thread"); moderation_redirect(get_forum_link($fid), $lang->redirect_threaddeleted); break;
|
Zeile 733 | Zeile 851 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
}
$plugins->run_hooks("moderation_deletepoll");
| }
$plugins->run_hooks("moderation_deletepoll");
|
$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);
|
}
|
}
|
|
|
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";"); output_page($deletepoll); break;
|
eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";"); output_page($deletepoll); break;
|
|
|
// Delete the actual poll here!
|
// Delete the actual poll here!
|
case "do_deletepoll":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| case "do_deletepoll":
// 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);
|
Zeile 768 | Zeile 891 |
---|
$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);
$moderation->delete_poll($poll['pid']);
|
$lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->poll_deleted);
$moderation->delete_poll($poll['pid']);
|
|
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_polldeleted); break;
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_polldeleted); break;
|
Zeile 787 | Zeile 910 |
---|
// 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, "canapproveunapprovethreads"))
|
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 814 | Zeile 943 |
---|
{ 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_unapprovethread");
| $thread = get_thread($tid);
$plugins->run_hooks("moderation_unapprovethread");
|
Zeile 828 | Zeile 963 |
---|
// 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'));
|
Zeile 850 | Zeile 985 |
---|
// Soft delete a thread case "softdeletethread":
|
// Soft delete a thread case "softdeletethread":
|
// 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, "cansoftdeletethreads")) { error_no_permission();
| if(!is_moderator($fid, "cansoftdeletethreads")) { error_no_permission();
|
Zeile 866 | Zeile 1001 |
---|
log_moderator_action($modlogdata, $lang->thread_soft_deleted);
$moderation->soft_delete_threads($tid);
|
log_moderator_action($modlogdata, $lang->thread_soft_deleted);
$moderation->soft_delete_threads($tid);
|
|
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadsoftdeleted); break;
// Move a thread case "move": add_breadcrumb($lang->nav_move);
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadsoftdeleted); break;
// Move a thread case "move": add_breadcrumb($lang->nav_move);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
$plugins->run_hooks("moderation_move");
| 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");
| $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
eval("\$movethread = \"".$templates->get("moderation_move")."\";"); output_page($movethread); break;
|
eval("\$movethread = \"".$templates->get("moderation_move")."\";"); output_page($movethread); break;
|
|
|
// Let's get this thing moving! case "do_move":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
// 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');
if(!is_moderator($fid, "canmanagethreads"))
|
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); $method = $mybb->get_input('method');
if(!is_moderator($fid, "canmanagethreads"))
|
{ 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"))
|
// Check if user has moderator permission to move to destination if(!is_moderator($moveto, "canmanagethreads") && !is_moderator($fid, "canmovetononmodforum"))
|
{
| {
|
error_no_permission(); }
|
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);
| error($lang->error_invalidforum, $lang->error); } if($method != "copy" && $thread['fid'] == $moveto) { error($lang->error_movetosameforum, $lang->error);
|
}
|
}
|
if($method != "copy" && $thread['fid'] == $moveto) { error($lang->error_movetosameforum); }
$plugins->run_hooks('moderation_do_move');
| $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);
|
Zeile 949 | Zeile 1096 |
---|
// Viewing thread notes case "viewthreadnotes": if(!is_moderator($fid))
|
// Viewing thread notes case "viewthreadnotes": if(!is_moderator($fid))
|
{
| {
|
error_no_permission(); }
// Make sure we are looking at a real thread here. if(!$thread)
|
error_no_permission(); }
// 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 995 | Zeile 1142 |
---|
$modactions = ''; while($modaction = $db->fetch_array($query)) {
|
$modactions = ''; while($modaction = $db->fetch_array($query)) {
|
$modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);
| $modaction['dateline'] = my_date('relative', $modaction['dateline']);
|
$modaction['username'] = htmlspecialchars_uni($modaction['username']); $modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']); $modaction['action'] = htmlspecialchars_uni($modaction['action']);
| $modaction['username'] = htmlspecialchars_uni($modaction['username']); $modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']); $modaction['action'] = htmlspecialchars_uni($modaction['action']);
|
Zeile 1007 | Zeile 1154 |
---|
eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_thread")."\";"); } if($modaction['fname'])
|
eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_thread")."\";"); } if($modaction['fname'])
|
{
| {
|
$modaction['fname'] = htmlspecialchars_uni($modaction['fname']); $modaction['forumlink'] = get_forum_link($modaction['fid']); eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_forum")."\";");
| $modaction['fname'] = htmlspecialchars_uni($modaction['fname']); $modaction['forumlink'] = get_forum_link($modaction['fid']); eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_forum")."\";");
|
Zeile 1085 | Zeile 1232 |
---|
$delayedmods = ''; while($delayedmod = $db->fetch_array($query)) {
|
$delayedmods = ''; while($delayedmod = $db->fetch_array($query)) {
|
$delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);
| $delayedmod['dateline'] = my_date('normal', $delayedmod['delaydateline'], "", 2);
|
$delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']];
| $delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']); $delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']];
|
Zeile 1129 | Zeile 1276 |
---|
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 1156 | Zeile 1303 |
---|
// 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, "canmanagethreads")) {
| if(!is_moderator($fid, "canmanagethreads")) {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 1178 | Zeile 1325 |
---|
if(!is_moderator($fid, "canviewips")) { error_no_permission();
|
if(!is_moderator($fid, "canviewips")) { 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 1200 | Zeile 1347 |
---|
$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 1395 |
---|
$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":
| // Merge threads case "merge":
|
Zeile 1249 | Zeile 1414 |
---|
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");
|
Zeile 1259 | Zeile 1429 |
---|
// 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'));
| // 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_do_merge");
| }
$plugins->run_hooks("moderation_do_merge");
|
Zeile 1328 | Zeile 1503 |
---|
$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 1361 | Zeile 1536 |
---|
{ 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 LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid) WHERE tid='$tid'
|
$query = $db->query(" SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid) WHERE tid='$tid'
|
ORDER BY dateline ASC
| ORDER BY dateline ASC, pid 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 = '';
| $altbg = "trow1"; $posts = '';
|
Zeile 1398 | Zeile 1580 |
---|
eval("\$posts .= \"".$templates->get("moderation_split_post")."\";"); $altbg = alt_trow(); }
|
eval("\$posts .= \"".$templates->get("moderation_split_post")."\";"); $altbg = alt_trow(); }
|
| clearinline($tid, 'thread');
|
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
|
|
$plugins->run_hooks("moderation_split");
|
$plugins->run_hooks("moderation_split");
|
|
|
eval("\$split = \"".$templates->get("moderation_split")."\";"); output_page($split); break;
| eval("\$split = \"".$templates->get("moderation_split")."\";"); output_page($split); break;
|
Zeile 1411 | Zeile 1595 |
---|
// 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, "canmanagethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
}
$plugins->run_hooks("moderation_do_split");
| }
if($thread['visible'] == -1) { error($lang->error_thread_deleted, $lang->error); }
$plugins->run_hooks("moderation_do_split");
|
$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); }
if($count['totalposts'] == count($mybb->input['splitpost'])) { error($lang->error_cantsplitall);
| error($lang->error_cantsplitonepost, $lang->error); }
if($count['totalposts'] == count($mybb->input['splitpost'])) { error($lang->error_cantsplitall, $lang->error);
|
}
if(!empty($mybb->input['moveto']))
| }
if(!empty($mybb->input['moveto']))
|
Zeile 1442 | Zeile 1631 |
---|
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); } else
|
$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); } else
|
{
| {
|
$moveto = $fid;
|
$moveto = $fid;
|
}
| }
|
$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();
// move the selected posts over
| $pids = array();
// move the selected posts over
|
Zeile 1463 | Zeile 1652 |
---|
$pids[] = $post['pid']; } mark_reports($post['pid'], "post");
|
$pids[] = $post['pid']; } mark_reports($post['pid'], "post");
|
}
$newtid = $moderation->split_posts($pids, $tid, $moveto, $mybb->get_input('newsubject'));
| }
$newtid = $moderation->split_posts($pids, $tid, $moveto, $mybb->get_input('newsubject'));
|
log_moderator_action($modlogdata, $lang->thread_split);
moderation_redirect(get_thread_link($newtid), $lang->redirect_threadsplit);
|
log_moderator_action($modlogdata, $lang->thread_split);
moderation_redirect(get_thread_link($newtid), $lang->redirect_threadsplit);
|
break;
| break;
|
// Delete Thread Subscriptions case "removesubscriptions":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
// 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");
| }
$plugins->run_hooks("moderation_removesubscriptions");
|
Zeile 1495 | Zeile 1689 |
---|
// Delete Threads - Inline moderation case "multideletethreads": add_breadcrumb($lang->nav_multi_deletethreads);
|
// Delete Threads - Inline moderation case "multideletethreads": add_breadcrumb($lang->nav_multi_deletethreads);
|
if(!empty($mybb->input['searchid'])) {
| if(!empty($mybb->input['searchid'])) {
|
// From search page $threads = getids($mybb->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'))
|
Zeile 1515 | Zeile 1709 |
---|
} 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);
|
Zeile 1588 | Zeile 1782 |
---|
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);
|
}
$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'); }
| 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_threadsopened);
|
else { clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsopened);
|
break;
| break;
|
// Close threads - Inline moderation case "multiclosethreads":
| // Close threads - Inline moderation case "multiclosethreads":
|
Zeile 1615 | Zeile 1809 |
---|
{ // 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, '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":
// 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')) {
| if(!is_moderator_by_tids($threads, 'canopenclosethreads')) {
|
error_no_permission(); } } else { $threads = getids($fid, 'forum');
|
error_no_permission(); } } else { $threads = getids($fid, 'forum');
|
if(!is_moderator($fid, 'canapproveunapprovethreads'))
| if(!is_moderator($fid, 'canopenclosethreads'))
|
{ 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->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(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads')) { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$moderation->approve_threads($threads, $fid);
| }
$moderation->approve_threads($threads, $fid);
|
Zeile 1681 | Zeile 1875 |
---|
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
|
{ clearinline($fid, 'forum'); }
| { clearinline($fid, 'forum'); }
|
Zeile 1709 | Zeile 1903 |
---|
{ $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); }
$moderation->unapprove_threads($threads, $fid);
| { error($lang->error_inline_nothreadsselected, $lang->error); }
$moderation->unapprove_threads($threads, $fid);
|
log_moderator_action($modlogdata, $lang->multi_unapproved_threads); if($mybb->get_input('inlinetype') == 'search')
|
log_moderator_action($modlogdata, $lang->multi_unapproved_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
|
{
| {
|
clearinline($fid, 'forum'); } $cache->update_stats();
| clearinline($fid, 'forum'); } $cache->update_stats();
|
Zeile 1735 | Zeile 1929 |
---|
// Restore threads - Inline moderation case "multirestorethreads":
|
// Restore threads - Inline moderation case "multirestorethreads":
|
|
|
// 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 1744 | Zeile 1938 |
---|
// 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 1755 | Zeile 1949 |
---|
{ 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); }
|
$moderation->restore_threads($threads);
log_moderator_action($modlogdata, $lang->multi_restored_threads);
| $moderation->restore_threads($threads);
log_moderator_action($modlogdata, $lang->multi_restored_threads);
|
Zeile 1777 | Zeile 1971 |
---|
break;
// Soft delete threads - Inline moderation
|
break;
// Soft delete threads - Inline moderation
|
case "multisoftdeletethreads":
// 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');
| case "multisoftdeletethreads":
// 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, 'cansoftdeletethreads'))
|
if(!is_moderator_by_tids($threads, 'cansoftdeletethreads'))
|
{ error_no_permission(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1801 | Zeile 1995 |
---|
} 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 1810 | Zeile 2004 |
---|
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($fid, 'forum');
| else { clearinline($fid, 'forum');
|
Zeile 1820 | Zeile 2014 |
---|
break;
// Stick threads - Inline moderation
|
break;
// Stick threads - Inline moderation
|
case "multistickthreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
| case "multistickthreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
if(!empty($mybb->input['searchid'])) {
| if(!empty($mybb->input['searchid'])) {
|
Zeile 1844 | Zeile 2038 |
---|
} if(count($threads) < 1) {
|
} if(count($threads) < 1) {
|
error($lang->error_inline_nothreadsselected);
| error($lang->error_inline_nothreadsselected, $lang->error);
|
}
$moderation->stick_threads($threads);
| }
$moderation->stick_threads($threads);
|
Zeile 1886 | Zeile 2080 |
---|
} 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);
|
}
$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($fid, 'forum'); }
| 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_threadsunstuck); break;
| moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunstuck); break;
|
Zeile 1912 | Zeile 2106 |
---|
// 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 1923 | Zeile 2117 |
---|
{ 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 1937 | Zeile 2131 |
---|
else { clearinline($fid, 'forum');
|
else { clearinline($fid, 'forum');
|
}
| }
|
$forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto"); $return_url = htmlspecialchars_uni($mybb->get_input('url')); eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";");
| $forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto"); $return_url = htmlspecialchars_uni($mybb->get_input('url')); eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";");
|
Zeile 1946 | Zeile 2140 |
---|
// 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')) { error_no_permission();
|
$threadlist = explode("|", $mybb->get_input('threads')); if(!is_moderator_by_tids($threadlist, 'canmanagethreads')) { error_no_permission();
|
}
| }
|
foreach($threadlist as $tid) { $tids[] = (int)$tid;
| foreach($threadlist as $tid) { $tids[] = (int)$tid;
|
Zeile 1963 | Zeile 2159 |
---|
// Make sure moderator has permission to move to the new forum $newperms = forum_permissions($moveto); if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, 'canmovetononmodforum'))
|
// Make sure moderator has permission to move to the new forum $newperms = forum_permissions($moveto); if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, '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); }
$moderation->move_threads($tids, $moveto);
| { 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); break;
| moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved); break;
|
Zeile 1995 | Zeile 2200 |
---|
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")) {
|
Zeile 2118 | Zeile 2323 |
---|
if(empty($posts)) {
|
if(empty($posts)) {
|
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 2131 | Zeile 2336 |
---|
SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
|
SELECT p.*, u.* FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
|
WHERE pid IN (".implode($posts, ",").") ORDER BY dateline ASC
| WHERE pid IN (".implode(",", $posts).") ORDER BY dateline ASC, pid ASC
|
"); $altbg = "trow1"; while($post = $db->fetch_array($query))
| "); $altbg = "trow1"; while($post = $db->fetch_array($query))
|
Zeile 2182 | Zeile 2387 |
---|
$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 2217 | Zeile 2422 |
---|
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 2241 | Zeile 2446 |
---|
{ 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 2266 | Zeile 2471 |
---|
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 2318 | Zeile 2523 |
---|
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 2337 | Zeile 2542 |
---|
{ 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 2362 | Zeile 2567 |
---|
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 2377 | Zeile 2582 |
---|
$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 2405 | Zeile 2610 |
---|
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 2429 | Zeile 2634 |
---|
{ 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 2454 | Zeile 2659 |
---|
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 2467 | Zeile 2672 |
---|
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'));
|
eval("\$moveposts = \"".$templates->get("moderation_inline_moveposts")."\";"); output_page($moveposts); break;
|
eval("\$moveposts = \"".$templates->get("moderation_inline_moveposts")."\";"); output_page($moveposts); break;
|
|
|
// Actually split the posts - Inline moderation case "do_multimoveposts":
|
// Actually split the posts - Inline moderation case "do_multimoveposts":
|
|
|
// 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
| $plugins->run_hooks("moderation_do_multimoveposts");
// explode at # sign in a url (indicates a name reference) and reassign to the url
|
Zeile 2489 | Zeile 2697 |
---|
// 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);
|
// 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]) {
| if(!empty($threadmatch[1])) {
|
$parameters['tid'] = $threadmatch[1]; }
|
$parameters['tid'] = $threadmatch[1]; }
|
if($postmatch[1])
| if(!empty($postmatch[1]))
|
{ $parameters['pid'] = $postmatch[1]; }
| { $parameters['pid'] = $postmatch[1]; }
|
Zeile 2539 | Zeile 2747 |
---|
$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 2572 | Zeile 2780 |
---|
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 2591 | Zeile 2799 |
---|
{ 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 2616 | Zeile 2824 |
---|
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 2644 | Zeile 2852 |
---|
} 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 2689 | Zeile 2897 |
---|
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 2732 | Zeile 2940 |
---|
} 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 2776 | Zeile 2984 |
---|
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 2807 | Zeile 3015 |
---|
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);
|
$user = get_user($uid);
|
if(!$user['uid'] || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid']))
| if(!$user || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid']))
|
{ error($lang->purgespammer_invalid_user); }
| { error($lang->purgespammer_invalid_user); }
|
Zeile 2864 | Zeile 3072 |
---|
}
// Add the IP's to the banfilters
|
}
// Add the IP's to the banfilters
|
foreach(array($user['regip'], $user['lastip']) as $ip)
| if($mybb->settings['purgespammerbanip'] == 1)
|
{
|
{
|
$ip = my_inet_ntop($db->unescape_binary($ip)); $query = $db->simple_select("banfilters", "type", "type = 1 AND filter = '".$db->escape_string($ip)."'"); if($db->num_rows($query) == 0)
| foreach(array($user['regip'], $user['lastip']) as $ip)
|
{
|
{
|
$insert = array( "filter" => $db->escape_string($ip), "type" => 1, "dateline" => TIME_NOW ); $db->insert_query("banfilters", $insert);
| $ip = my_inet_ntop($db->unescape_binary($ip)); $query = $db->simple_select("banfilters", "type", "type = 1 AND filter = '".$db->escape_string($ip)."'"); if($db->num_rows($query) == 0) { $insert = array( "filter" => $db->escape_string($ip), "type" => 1, "dateline" => TIME_NOW ); $db->insert_query("banfilters", $insert); }
|
} }
// Clear the profile $userhandler->clear_profile($uid, $mybb->settings['purgespammerbangroup']);
|
} }
// Clear the profile $userhandler->clear_profile($uid, $mybb->settings['purgespammerbangroup']);
|
$cache->update_banned();
| |
$cache->update_bannedips(); $cache->update_awaitingactivation();
| $cache->update_bannedips(); $cache->update_awaitingactivation();
|
Zeile 2911 | Zeile 3121 |
---|
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 2943 | Zeile 3153 |
---|
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']))
|
Zeile 2951 | Zeile 3166 |
---|
$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']));
|
$modtype = $mybb->get_input('modtype'); $inlinetype = $mybb->get_input('inlinetype'); $searchid = $mybb->get_input('searchid');
| $action = $mybb->get_input('action', MyBB::INPUT_INT); $modtype = htmlspecialchars_uni($mybb->get_input('modtype')); $inlinetype = htmlspecialchars_uni($mybb->get_input('inlinetype')); $searchid = htmlspecialchars_uni($mybb->get_input('searchid'));
|
$url = htmlspecialchars_uni($mybb->get_input('url')); $plugins->run_hooks('moderation_confirmation');
| $url = htmlspecialchars_uni($mybb->get_input('url')); $plugins->run_hooks('moderation_confirmation');
|
Zeile 2962 | Zeile 3178 |
---|
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 2970 | Zeile 3188 |
---|
$tids = getids($mybb->get_input('searchid'), 'search'); } else
|
$tids = getids($mybb->get_input('searchid'), 'search'); } else
|
{
| {
|
$tids = getids($fid, "forum");
|
$tids = getids($fid, "forum");
|
}
| }
|
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")) { error_no_permission();
| if(!is_moderator_by_tids($tids, "canusecustomtools")) { error_no_permission();
|
Zeile 2985 | Zeile 3203 |
---|
$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);
|
$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']);
| $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'));
|
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
redirect($return_url, $lang->redirect_customtool_search);
| moderation_redirect($return_url, $lang->redirect_customtool_search);
|
} else { clearinline($fid, "forum");
|
} else { clearinline($fid, "forum");
|
$lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']);
| $lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']);
|
redirect(get_forum_link($fid), $lang->redirect_customtool_forum); } break; } elseif($tool['type'] == 't' && $mybb->get_input('modtype') == 'thread')
|
redirect(get_forum_link($fid), $lang->redirect_customtool_forum); } break; } elseif($tool['type'] == 't' && $mybb->get_input('modtype') == 'thread')
|
{
| {
|
if(!is_moderator_by_tids($tid, "canusecustomtools")) { error_no_permission();
| if(!is_moderator_by_tids($tid, "canusecustomtools")) { error_no_permission();
|
Zeile 3016 | Zeile 3234 |
---|
$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 3040 | Zeile 3258 |
---|
{ $pids = getids($mybb->get_input('searchid'), 'search'); }
|
{ $pids = getids($mybb->get_input('searchid'), 'search'); }
|
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"))
|
{
| {
|
error_no_permission(); }
// Get threads which are associated with the posts $tids = array(); $options = array(
|
error_no_permission(); }
// Get threads which are associated with the posts $tids = array(); $options = array(
|
'order_by' => 'dateline', 'order_dir' => 'asc'
| 'order_by' => 'dateline, pid',
|
); $query = $db->simple_select("posts", "DISTINCT tid, dateline", "pid IN (".implode(',',$pids).")", $options); while($row = $db->fetch_array($query))
| ); $query = $db->simple_select("posts", "DISTINCT tid, dateline", "pid IN (".implode(',',$pids).")", $options); while($row = $db->fetch_array($query))
|
Zeile 3074 | Zeile 3291 |
---|
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 3092 | Zeile 3309 |
---|
}
break;
|
}
break;
|
}
| }
|
} error_no_permission(); break;
|
} error_no_permission(); break;
|
}
| }
|
/** * Some little handy functions for our inline moderation *
| /** * Some little handy functions for our inline moderation *
|
Zeile 3124 | Zeile 3341 |
---|
}
if($cookie_id == 'ALL')
|
}
if($cookie_id == 'ALL')
|
{
| {
|
$newids += getallids($id, $type); } else
| $newids += getallids($id, $type); } else
|
Zeile 3135 | Zeile 3352 |
---|
}
return $newids;
|
}
return $newids;
|
}
/** * @param int $id
| }
/** * @param int $id
|
* @param string $type * * @return array
| * @param string $type * * @return array
|
Zeile 3159 | Zeile 3376 |
---|
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') { $query = $db->simple_select("threads", "tid", "fid='".(int)$id."'"); while($tid = $db->fetch_field($query, "tid"))
|
// "Select all Threads in this forum" only supported by forumdisplay and search if($type == 'forum') { $query = $db->simple_select("threads", "tid", "fid='".(int)$id."'"); while($tid = $db->fetch_field($query, "tid"))
|
{
| {
|
if(in_array($tid, $removed_ids)) { continue;
| if(in_array($tid, $removed_ids)) { continue;
|
Zeile 3176 | Zeile 3393 |
---|
$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 3185 | Zeile 3402 |
---|
$ids = explode(',', $searchlog['posts']); } else
|
$ids = explode(',', $searchlog['posts']); } else
|
{
| {
|
$ids = explode(',', $searchlog['threads']); }
| $ids = explode(',', $searchlog['threads']); }
|
Zeile 3202 | Zeile 3419 |
---|
}
return $ids;
|
}
return $ids;
|
}
| }
|
/** * @param int $id * @param string $type
| /** * @param int $id * @param string $type
|
Zeile 3212 | Zeile 3429 |
---|
{ my_unsetcookie("inlinemod_".$type.$id); my_unsetcookie("inlinemod_{$type}{$id}_removed");
|
{ my_unsetcookie("inlinemod_".$type.$id); my_unsetcookie("inlinemod_{$type}{$id}_removed");
|
}
/**
| }
/**
|
* @param int $id * @param string $type */
| * @param int $id * @param string $type */
|
Zeile 3226 | Zeile 3443 |
---|
/** * Checks if the current user is a moderator of all the posts specified
|
/** * Checks if the current user is a moderator of all the posts specified
|
*
| *
|
* Note: If no posts are specified, this function will return true. It is the * responsibility of the calling script to error-check this case if necessary. * * @param array $posts Array of post IDs
|
* Note: If no posts are specified, this function will return true. It is the * responsibility of the calling script to error-check this case if necessary. * * @param array $posts Array of post IDs
|
* @param string $permission Permission to check
| * @param string $permission Permission to check
|
* @return bool True if moderator of all; false otherwise */ function is_moderator_by_pids($posts, $permission='') { global $db, $mybb;
|
* @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']) {
| // Speedy determination for supermods/admins and guests if($mybb->usergroup['issupermod']) {
|
Zeile 3249 | Zeile 3466 |
---|
} // Make an array of threads if not an array if(!is_array($posts))
|
} // Make an array of threads if not an array if(!is_array($posts))
|
{
| {
|
$posts = array($posts); } // Validate input
| $posts = array($posts); } // Validate input
|
Zeile 3277 | Zeile 3494 |
---|
* @param array $threads Array of thread IDs * @param string $permission Permission to check * @return bool True if moderator of all; false otherwise
|
* @param array $threads Array of thread IDs * @param string $permission Permission to check * @return bool True if moderator of all; false otherwise
|
*/
| */
|
function is_moderator_by_tids($threads, $permission='') { global $db, $mybb;
| function is_moderator_by_tids($threads, $permission='') { global $db, $mybb;
|
Zeile 3295 | Zeile 3512 |
---|
if(!is_array($threads)) { $threads = array($threads);
|
if(!is_array($threads)) { $threads = array($threads);
|
}
| }
|
// Validate input $threads = array_map('intval', $threads); $threads[] = 0;
| // Validate input $threads = array_map('intval', $threads); $threads[] = 0;
|
Zeile 3323 | Zeile 3540 |
---|
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); }
|