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'; $templatelist .= ',moderation_move,moderation_threadnotes_modaction,moderation_threadnotes_delayedmodaction,moderation_threadnotes,moderation_getip_modoptions,moderation_getip,moderation_getpmip,moderation_merge'; $templatelist .= ',moderation_split_post,moderation_split,moderation_inline_deletethreads,moderation_inline_movethreads,moderation_inline_deleteposts,moderation_inline_mergeposts,moderation_threadnotes_modaction_error'; $templatelist .= ',moderation_inline_splitposts,forumjump_bit,forumjump_special,forumjump_advanced,forumdisplay_password_wrongpass,forumdisplay_password,moderation_inline_moveposts,moderation_delayedmodaction_error,moderation_purgespammer,moderation_delayedmoderation_date_day,moderation_delayedmoderation_date_month';
| $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_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_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 30 | Zeile 34 |
---|
$plugins->run_hooks("moderation_start");
|
$plugins->run_hooks("moderation_start");
|
$tid = $mybb->get_input('tid', 1); $pid = $mybb->get_input('pid', 1); $fid = $mybb->get_input('fid', 1); $pmid = $mybb->get_input('pmid', 1);
| $tid = $mybb->get_input('tid', 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) {
| if($pid) {
|
Zeile 67 | Zeile 72 |
---|
$permissions = forum_permissions($fid); }
|
$permissions = forum_permissions($fid); }
|
if($pmid && $pmid > 0)
| if($pmid > 0)
|
{
|
{
|
$query = $db->query(" SELECT * FROM ".TABLE_PREFIX."privatemessages WHERE pmid='{$pmid}' ");
| $query = $db->simple_select('privatemessages', 'uid, subject, ipaddress, fromid', "pmid = $pmid");
|
$pm = $db->fetch_array($query);
| $pm = $db->fetch_array($query);
|
Zeile 109 | Zeile 110 |
---|
check_forum_password($forum['fid']); }
|
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")."\";");
|
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))
|
$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(); }
| error_no_permission(); }
|
Zeile 130 | Zeile 149 |
---|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
}
$db->delete_query("delayedmoderation", "did='".$mybb->get_input('did', 1)."'");
| }
$plugins->run_hooks('moderation_cancel_delayedmoderation');
$db->delete_query("delayedmoderation", "did='".$mybb->get_input('did', MyBB::INPUT_INT)."'");
|
if($tid == 0) {
| if($tid == 0) {
|
Zeile 147 | Zeile 168 |
---|
case "delayedmoderation": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
case "delayedmoderation": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
| $localized_time_offset = $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
|
|
|
if(!$mybb->get_input('date_day', 1))
| if(!$mybb->get_input('date_day', MyBB::INPUT_INT))
|
{
|
{
|
$mybb->input['date_day'] = date('d', TIME_NOW); } if(!$mybb->get_input('date_month', 1)) { $mybb->input['date_month'] = date('m', TIME_NOW);
| $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']))
|
}
// 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')
|
$mybb->input['tids'] = $tid; } else { if($mybb->get_input('inlinetype') == 'search')
|
{
| {
|
$tids = getids($mybb->get_input('searchid'), 'search'); } else {
|
$tids = getids($mybb->get_input('searchid'), 'search'); } else {
|
$fid = $mybb->get_input('fid', 1);
| $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
$tids = getids($fid, "forum");
|
$tids = getids($fid, "forum");
|
}
| }
|
if(count($tids) < 1) { error($lang->error_inline_nothreadsselected);
| if(count($tids) < 1) { error($lang->error_inline_nothreadsselected);
|
Zeile 191 | 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');
| 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"; }
|
|
|
switch($db->type)
| if(is_moderator($fid, "canapproveunapprovethreads"))
|
{
|
{
|
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[] = "approveunapprovethread";
|
}
|
}
|
while($tool = $db->fetch_array($query)) { $allowed_types[] = "modtool_".$tool['tid'];
| |
|
|
$tool['name'] = htmlspecialchars_uni($tool['name']);
| $mybb->input['type'] = $mybb->get_input('type');
|
|
|
$checked = ""; if($mybb->input['type'] == "modtool_".$tool['tid']) { $checked = "checked=\"checked\""; }
eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";"); }
| 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', 2);
| $mybb->input['delayedmoderation'] = $mybb->get_input('delayedmoderation', MyBB::INPUT_ARRAY);
|
if($mybb->input['action'] == "do_delayedmoderation" && $mybb->request_method == "post") { if(!in_array($mybb->input['type'], $allowed_types))
|
if($mybb->input['action'] == "do_delayedmoderation" && $mybb->request_method == "post") { if(!in_array($mybb->input['type'], $allowed_types))
|
{
| {
|
$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'))))
|
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') {
|
$mybb->input['delayedmoderation']['method'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_method; }
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'] != '')
|
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
{
| {
|
$errors[] = $lang->error_invalidforum;
|
$errors[] = $lang->error_invalidforum;
|
| }
$method = $mybb->input['delayedmoderation']['method']; if($method != "copy" && $fid == $newfid) { $errors[] = $lang->error_movetosameforum;
|
} }
| } }
|
Zeile 254 | Zeile 323 |
---|
$errors[] = $lang->error_delayedmoderation_invalid_date_month; }
|
$errors[] = $lang->error_delayedmoderation_invalid_date_month; }
|
if($mybb->input['date_year'] < gmdate('Y', TIME_NOW))
| if($mybb->input['date_year'] < gmdate('Y', TIME_NOW + $localized_time_offset))
|
{ $errors[] = $lang->error_delayedmoderation_invalid_date_year; }
|
{ $errors[] = $lang->error_delayedmoderation_invalid_date_year; }
|
$date_time = explode(' ', (string)$mybb->input['date_time']);
| $date_time = explode(' ', $mybb->get_input('date_time'));
|
$date_time = explode(':', (string)$date_time[0]);
if(stristr($mybb->input['date_time'], 'pm'))
| $date_time = explode(':', (string)$date_time[0]);
if(stristr($mybb->input['date_time'], 'pm'))
|
Zeile 271 | Zeile 340 |
---|
} }
|
} }
|
$rundate = mktime((int)$date_time[0], (int)$date_time[1], date('s', TIME_NOW), (int)$mybb->input['date_month'], (int)$mybb->input['date_day'], (int)$mybb->input['date_year']);
| $rundate = gmmktime((int)$date_time[0], (int)$date_time[1], date('s', TIME_NOW), $mybb->get_input('date_month', MyBB::INPUT_INT), $mybb->get_input('date_day', MyBB::INPUT_INT), $mybb->get_input('date_year', MyBB::INPUT_INT)) - $localized_time_offset;
|
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']);
|
}
|
}
|
$db->insert_query("delayedmoderation", array(
| $did = $db->insert_query("delayedmoderation", array(
|
'type' => $db->escape_string($mybb->input['type']), 'delaydateline' => (int)$rundate, 'uid' => $mybb->user['uid'], 'tids' => $db->escape_string($mybb->input['tids']), 'fid' => $fid, 'dateline' => TIME_NOW,
|
'type' => $db->escape_string($mybb->input['type']), 'delaydateline' => (int)$rundate, 'uid' => $mybb->user['uid'], 'tids' => $db->escape_string($mybb->input['tids']), 'fid' => $fid, 'dateline' => TIME_NOW,
|
'inputs' => $db->escape_string(serialize($mybb->input['delayedmoderation']))
| 'inputs' => $db->escape_string(my_serialize($mybb->input['delayedmoderation']))
|
));
|
));
|
| $plugins->run_hooks('moderation_do_delayedmoderation');
|
$rundate_format = my_date('relative', $rundate, '', 2); $lang->redirect_delayed_moderation_thread = $lang->sprintf($lang->redirect_delayed_moderation_thread, $rundate_format);
| $rundate_format = my_date('relative', $rundate, '', 2); $lang->redirect_delayed_moderation_thread = $lang->sprintf($lang->redirect_delayed_moderation_thread, $rundate_format);
|
Zeile 461 | Zeile 532 |
---|
"); } }
|
"); } }
|
|
|
while($delayedmod = $db->fetch_array($query)) {
|
while($delayedmod = $db->fetch_array($query)) {
|
$delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);
| $delayedmod['dateline'] = my_date("jS M Y, {$mybb->settings['timeformat']}", $delayedmod['delaydateline']); $delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']);
|
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']]; $info = ''; if(strpos($delayedmod['tids'], ',') === false)
|
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']]; $info = ''; if(strpos($delayedmod['tids'], ',') === false)
|
{
| {
|
$delayed_thread = get_thread($delayedmod['tids']);
|
$delayed_thread = get_thread($delayedmod['tids']);
|
$info .= "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($delayedmod['tids'])."\">".htmlspecialchars_uni($delayed_thread['subject'])."</a><br />"; } else { $info .= "<strong>{$lang->thread}</strong> {$lang->multiple_threads}<br />"; }
if($delayedmod['fname']) { $info .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($delayedmod['fid'])."\">".htmlspecialchars_uni($delayedmod['fname'])."</a><br />"; } $delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);
if($delayedmod['type'] == 'move') { $info .= "<strong>{$lang->new_forum}</strong> <a href=\"".get_forum_link($delayedmod['inputs']['new_forum'])."\">".htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name'])."</a><br />"; 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}"; } $info .= "<strong>{$lang->leave_redirect_for}</strong> {$redirect_expire_bit}<br />"; } } else if($delayedmod['type'] == 'merge')
| $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 { $redirect_expire_bit = (int)$delayedmod['inputs']['redirect_expire']." {$lang->days}"; }
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";"); } } else if($delayedmod['type'] == 'merge')
|
{
|
{
|
$info .= "<strong>{$lang->new_subject}</strong> ".htmlspecialchars_uni($delayedmod['inputs']['subject'])."<br />"; $info .= "<strong>{$lang->thread_to_merge_with}</strong> <a href=\"".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."\">".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."</a><br />";
| $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();
|
}
eval("\$delayedmods .= \"".$templates->get("moderation_delayedmodaction_notes")."\";"); $trow = alt_trow();
|
}
| }
|
if(!$delayedmods) { $cols = 5; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";");
|
if(!$delayedmods) { $cols = 5; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";");
|
}
| }
|
$url = '';
|
$url = '';
|
if($mybb->get_input('tid', 1))
| if($mybb->get_input('tid', MyBB::INPUT_INT))
|
{ $lang->threads = $lang->thread;
|
{ $lang->threads = $lang->thread;
|
$threads = "<a href=\"".get_thread_link($tid)."\">{$thread['subject']}</a>";
| $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")."\";"); } else
| eval("\$moderation_delayedmoderation_merge = \"".$templates->get("moderation_delayedmoderation_merge")."\";"); } else
|
Zeile 540 | Zeile 625 |
---|
$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")."\";");
// Generate form elements for date form
| eval("\$moderation_delayedmoderation_move = \"".$templates->get("moderation_delayedmoderation_move")."\";");
// Generate form elements for date form
|
Zeile 548 | Zeile 633 |
---|
for($day = 1; $day <= 31; ++$day) { $selected = '';
|
for($day = 1; $day <= 31; ++$day) { $selected = '';
|
if($mybb->get_input('date_day', 1) == $day)
| if($mybb->get_input('date_day', MyBB::INPUT_INT) == $day)
|
{ $selected = ' selected="selected"';
|
{ $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)
|
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[$month] = '';
|
$datemonth[$month] = '';
|
if($mybb->get_input('date_month', 1) == (int)$month)
| if($mybb->get_input('date_month', MyBB::INPUT_INT) == (int)$month)
|
{ $datemonth[$month] = ' selected="selected"'; }
| { $datemonth[$month] = ' selected="selected"'; }
|
Zeile 568 | Zeile 653 |
---|
eval('$datemonth = "'.$templates->get('moderation_delayedmoderation_date_month').'";');
|
eval('$datemonth = "'.$templates->get('moderation_delayedmoderation_date_month').'";');
|
$dateyear = gmdate('Y', TIME_NOW); $datetime = gmdate('g:i a', TIME_NOW);
| $dateyear = gmdate('Y', TIME_NOW + $localized_time_offset); $datetime = gmdate($mybb->settings['timeformat'], TIME_NOW + $localized_time_offset);
|
|
|
$plugins->run_hooks("moderation_delayedmoderation");
| $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");
|
eval("\$delayedmoderation = \"".$templates->get("moderation_delayedmoderation")."\";"); output_page($delayedmoderation);
| eval("\$delayedmoderation = \"".$templates->get("moderation_delayedmoderation")."\";"); output_page($delayedmoderation);
|
Zeile 597 | Zeile 712 |
---|
$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);
|
moderation_redirect(get_thread_link($thread['tid']), $redirect); break;
| moderation_redirect(get_thread_link($thread['tid']), $redirect); break;
|
Zeile 617 | Zeile 732 |
---|
}
$plugins->run_hooks("moderation_stick");
|
}
$plugins->run_hooks("moderation_stick");
|
if($thread['sticky'] == 1)
| if($thread['sticky'] == 1)
|
{ $stuckunstuck = $lang->unstuck; $redirect = $lang->redirect_unstickthread; $moderation->unstick_threads($tid);
|
{ $stuckunstuck = $lang->unstuck; $redirect = $lang->redirect_unstickthread; $moderation->unstick_threads($tid);
|
}
| }
|
else { $stuckunstuck = $lang->stuck;
| else { $stuckunstuck = $lang->stuck;
|
Zeile 634 | Zeile 749 |
---|
$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_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();
|
}
$plugins->run_hooks("moderation_removeredirects");
| }
$plugins->run_hooks("moderation_removeredirects");
|
$moderation->remove_redirects($tid);
log_moderator_action($modlogdata, $lang->redirects_removed); moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_redirectsremoved);
|
$moderation->remove_redirects($tid);
log_moderator_action($modlogdata, $lang->redirects_removed); moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_redirectsremoved);
|
break;
| break;
|
// Delete thread confirmation page case "deletethread":
add_breadcrumb($lang->nav_deletethread);
|
// Delete thread confirmation page case "deletethread":
add_breadcrumb($lang->nav_deletethread);
|
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'])
| if(!is_moderator($fid, "candeletethreads")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
|
Zeile 690 | Zeile 785 |
---|
} }
|
} }
|
$plugins->run_hooks("moderation_do_deletethread");
| $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 $modlogdata['thread_subject'] = $thread['subject'];
| // Log the subject of the deleted thread $modlogdata['thread_subject'] = $thread['subject'];
|
Zeile 719 | Zeile 834 |
---|
$plugins->run_hooks("moderation_deletepoll");
|
$plugins->run_hooks("moderation_deletepoll");
|
$query = $db->simple_select("polls", "*", "tid='$tid'");
| $query = $db->simple_select("polls", "pid", "tid='$tid'");
|
$poll = $db->fetch_array($query); if(!$poll) {
| $poll = $db->fetch_array($query); if(!$poll) {
|
Zeile 747 | Zeile 862 |
---|
error_no_permission(); } }
|
error_no_permission(); } }
|
$query = $db->simple_select("polls", "*", "tid='$tid'");
| $query = $db->simple_select("polls", "pid", "tid = $tid");
|
$poll = $db->fetch_array($query); if(!$poll) {
| $poll = $db->fetch_array($query); if(!$poll) {
|
Zeile 784 | Zeile 899 |
---|
$moderation->approve_threads($tid, $fid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadapproved);
|
$moderation->approve_threads($tid, $fid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadapproved);
|
break;
| break;
|
// Unapprove a thread case "unapprovethread":
|
// Unapprove a thread case "unapprovethread":
|
// 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(); } $thread = get_thread($tid);
| { error_no_permission(); } $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->unapprove_threads($tid);
|
|
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
|
break;
| break;
|
// Restore a thread case "restorethread":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
// Restore a thread case "restorethread":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
|
|
if(!is_moderator($fid, "canrestorethreads")) { error_no_permission(); } $thread = get_thread($tid);
|
if(!is_moderator($fid, "canrestorethreads")) { error_no_permission(); } $thread = get_thread($tid);
|
|
|
$plugins->run_hooks("moderation_restorethread");
$lang->thread_restored = $lang->sprintf($lang->thread_restored, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_restored);
|
$plugins->run_hooks("moderation_restorethread");
$lang->thread_restored = $lang->sprintf($lang->thread_restored, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_restored);
|
$moderation->restore_threads($tid, $fid);
| $moderation->restore_threads($tid);
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored); break;
// Soft delete a thread
|
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'));
| case "softdeletethread":
// 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 868 | Zeile 983 |
---|
break;
// Let's get this thing moving!
|
break;
// 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', 1); $method = $mybb->get_input('method');
if(!is_moderator($fid, "canmanagethreads")) {
| 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")) {
|
error_no_permission(); } // Check if user has moderator permission to move to destination if(!is_moderator($moveto, "canmanagethreads") && !is_moderator($fid, "canmovetononmodforum"))
|
error_no_permission(); } // Check if user has moderator permission to move to destination if(!is_moderator($moveto, "canmanagethreads") && !is_moderator($fid, "canmovetononmodforum"))
|
{
| {
|
error_no_permission(); } $newperms = forum_permissions($moveto); if($newperms['canview'] == 0 && !is_moderator($fid, "canmovetononmodforum"))
|
error_no_permission(); } $newperms = forum_permissions($moveto); if($newperms['canview'] == 0 && !is_moderator($fid, "canmovetononmodforum"))
|
{ error_no_permission();
| { error($lang->error_movetononmodforum);
|
}
$newforum = get_forum($moveto);
| }
$newforum = get_forum($moveto);
|
Zeile 900 | Zeile 1015 |
---|
{ error($lang->error_movetosameforum); }
|
{ error($lang->error_movetosameforum); }
|
| $plugins->run_hooks('moderation_do_move');
|
$expire = 0;
|
$expire = 0;
|
if($mybb->get_input('redirect_expire', 1) > 0)
| if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0)
|
{
|
{
|
$expire = TIME_NOW + ($mybb->get_input('redirect_expire', 1) * 86400);
| $expire = TIME_NOW + ($mybb->get_input('redirect_expire', MyBB::INPUT_INT) * 86400);
|
}
$the_thread = $tid;
| }
$the_thread = $tid;
|
Zeile 915 | Zeile 1032 |
---|
{ case "copy": log_moderator_action($modlogdata, $lang->thread_copied);
|
{ case "copy": log_moderator_action($modlogdata, $lang->thread_copied);
|
break; default:
| break; default:
|
case "move": case "redirect": log_moderator_action($modlogdata, $lang->thread_moved);
| case "move": case "redirect": log_moderator_action($modlogdata, $lang->thread_moved);
|
Zeile 929 | Zeile 1046 |
---|
// 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) { error($lang->error_nomember);
|
// Make sure we are looking at a real thread here. if(!$thread) { error($lang->error_nomember);
|
}
| }
$plugins->run_hooks('moderation_viewthreadnotes');
|
$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $thread['subject']);
|
$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $thread['subject']);
|
|
|
$thread['notes'] = nl2br(htmlspecialchars_uni($thread['notes']));
eval("\$viewthreadnotes = \"".$templates->get("moderation_viewthreadnotes", 1, 0)."\";");
| $thread['notes'] = nl2br(htmlspecialchars_uni($thread['notes']));
eval("\$viewthreadnotes = \"".$templates->get("moderation_viewthreadnotes", 1, 0)."\";");
|
Zeile 950 | Zeile 1069 |
---|
// Thread notes editor case "threadnotes": add_breadcrumb($lang->nav_threadnotes);
|
// Thread notes editor case "threadnotes": add_breadcrumb($lang->nav_threadnotes);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
|
$thread['notes'] = htmlspecialchars_uni($parser->parse_badwords($thread['notes'])); $trow = alt_trow(1);
| $thread['notes'] = htmlspecialchars_uni($parser->parse_badwords($thread['notes'])); $trow = alt_trow(1);
|
Zeile 974 | Zeile 1093 |
---|
while($modaction = $db->fetch_array($query)) { $modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);
|
while($modaction = $db->fetch_array($query)) { $modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);
|
| $modaction['username'] = htmlspecialchars_uni($modaction['username']);
|
$modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']); $modaction['action'] = htmlspecialchars_uni($modaction['action']); $info = ''; if($modaction['tsubject']) {
|
$modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']); $modaction['action'] = htmlspecialchars_uni($modaction['action']); $info = ''; if($modaction['tsubject']) {
|
$info .= "<strong>$lang->thread</strong> <a href=\"".get_thread_link($modaction['tid'])."\">".htmlspecialchars_uni($modaction['tsubject'])."</a><br />";
| $modaction['tsubject'] = htmlspecialchars_uni($parser->parse_badwords($modaction['tsubject'])); $modaction['threadlink'] = get_thread_link($modaction['tid']); eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_thread")."\";");
|
} if($modaction['fname']) {
|
} if($modaction['fname']) {
|
$info .= "<strong>$lang->forum</strong> <a href=\"".get_forum_link($modaction['fid'])."\">".htmlspecialchars_uni($modaction['fname'])."</a><br />";
| $modaction['fname'] = htmlspecialchars_uni($modaction['fname']); $modaction['forumlink'] = get_forum_link($modaction['fid']); eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_forum")."\";");
|
} if($modaction['psubject']) {
|
} if($modaction['psubject']) {
|
$info .= "<strong>$lang->post</strong> <a href=\"".get_post_link($modaction['pid'])."#pid".$modaction['pid']."\">".htmlspecialchars_uni($modaction['psubject'])."</a>";
| $modaction['psubject'] = htmlspecialchars_uni($parser->parse_badwords($modaction['psubject'])); $modaction['postlink'] = get_post_link($modaction['pid']); eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_post")."\";");
|
}
eval("\$modactions .= \"".$templates->get("moderation_threadnotes_modaction")."\";"); $trow = alt_trow();
|
}
eval("\$modactions .= \"".$templates->get("moderation_threadnotes_modaction")."\";"); $trow = alt_trow();
|
}
| }
|
if(!$modactions) { eval("\$modactions = \"".$templates->get("moderation_threadnotes_modaction_error")."\";");
| if(!$modactions) { eval("\$modactions = \"".$templates->get("moderation_threadnotes_modaction_error")."\";");
|
Zeile 1056 | Zeile 1183 |
---|
while($delayedmod = $db->fetch_array($query)) { $delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);
|
while($delayedmod = $db->fetch_array($query)) { $delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);
|
| $delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']);
|
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']]; $info = ''; if(strpos($delayedmod['tids'], ',') === false) {
|
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']); $delayedmod['action'] = $actions[$delayedmod['type']]; $info = ''; if(strpos($delayedmod['tids'], ',') === false) {
|
$info .= "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($delayedmod['tids'])."\">{$thread['subject']}</a><br />";
| $delayed_thread['link'] = get_thread_link($delayedmod['tids']); $delayed_thread['subject'] = htmlspecialchars_uni($thread['subject']); eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_single")."\";");
|
} else {
|
} else {
|
$info .= "<strong>{$lang->thread}</strong> {$lang->multiple_threads}<br />";
| eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_multiple")."\";");
|
}
if($delayedmod['fname']) {
|
}
if($delayedmod['fname']) {
|
$info .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($delayedmod['fid'])."\">".htmlspecialchars_uni($delayedmod['fname'])."</a><br />";
| $delayedmod['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['inputs'] = my_unserialize($delayedmod['inputs']);
if($delayedmod['type'] == 'move') {
|
$info .= "<strong>{$lang->new_forum}</strong> <a href=\"".get_forum_link($delayedmod['inputs']['new_forum'])."\">".htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name'])."</a><br />";
| $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($delayedmod['inputs']['method'] == "redirect") {
|
$info .= "<strong>{$lang->leave_redirect_for}</strong> ".(int)$delayedmod['inputs']['redirect_expire']." {$lang->days}<br />";
| 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")."\";");
|
} } else if($delayedmod['type'] == 'merge') {
|
} } else if($delayedmod['type'] == 'merge') {
|
$info .= "<strong>{$lang->new_subject}</strong> ".htmlspecialchars_uni($delayedmod['inputs']['subject'])."<br />"; $info .= "<strong>{$lang->thread_to_merge_with}</strong> <a href=\"".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."\">".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."</a><br />";
| $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_threadnotes_delayedmodaction")."\";");
| }
eval("\$delayedmods .= \"".$templates->get("moderation_threadnotes_delayedmodaction")."\";");
|
Zeile 1127 | Zeile 1272 |
---|
// Let's look up the ip address of a post case "getip": add_breadcrumb($lang->nav_getip);
|
// Let's look up the ip address of a post case "getip": add_breadcrumb($lang->nav_getip);
|
if(!is_moderator($fid, "canviewips") || !$mybb->usergroup['issupermod'])
| if(!is_moderator($fid, "canviewips"))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 1139 | Zeile 1284 |
---|
$hostname = $lang->resolve_fail; }
|
$hostname = $lang->resolve_fail; }
|
| $post['username'] = htmlspecialchars_uni($post['username']);
|
$username = build_profile_link($post['username'], $post['uid']);
// Moderator options
| $username = build_profile_link($post['username'], $post['uid']);
// Moderator options
|
Zeile 1146 | Zeile 1292 |
---|
if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canuseipsearch'] == 1) { $ipaddress = $post['ipaddress'];
|
if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canuseipsearch'] == 1) { $ipaddress = $post['ipaddress'];
|
eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";"); }
| eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";"); }
$plugins->run_hooks('moderation_getip');
|
|
|
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) { error($lang->error_invalidpm);
|
// Let's look up the ip address of a PM case "getpmip": if($pmid <= 0) { error($lang->error_invalidpm);
|
}
| }
|
add_breadcrumb($lang->nav_pms, "private.php"); $pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject'])); add_breadcrumb($pm['subject'], "private.php?action=read&pmid={$pmid}");
| add_breadcrumb($lang->nav_pms, "private.php"); $pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject'])); add_breadcrumb($pm['subject'], "private.php?action=read&pmid={$pmid}");
|
Zeile 1166 | Zeile 1323 |
---|
if(!$mybb->usergroup['issupermod']) { error_no_permission();
|
if(!$mybb->usergroup['issupermod']) { error_no_permission();
|
}
| }
|
$pm['ipaddress'] = my_inet_ntop($db->unescape_binary($pm['ipaddress'])); $hostname = @gethostbyaddr($pm['ipaddress']); if(!$hostname || $hostname == $pm['ipaddress']) { $hostname = $lang->resolve_fail;
|
$pm['ipaddress'] = my_inet_ntop($db->unescape_binary($pm['ipaddress'])); $hostname = @gethostbyaddr($pm['ipaddress']); if(!$hostname || $hostname == $pm['ipaddress']) { $hostname = $lang->resolve_fail;
|
}
$user = get_user($pm['uid']); $pm['username'] = $user['username'];
$username = build_profile_link($pm['username'], $pm['uid']);
| }
$name = $db->fetch_field($db->simple_select('users', 'username', "uid = {$pm['fromid']}"), 'username'); $username = build_profile_link($name, $pm['fromid']);
|
// Moderator options $modoptions = ""; if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canuseipsearch'] == 1)
| // Moderator options $modoptions = ""; if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canuseipsearch'] == 1)
|
Zeile 1188 | Zeile 1343 |
---|
eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";"); }
|
eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";"); }
|
eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";"); output_page($getpmip); break;
| $plugins->run_hooks('moderation_getpmip');
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 1328 | Zeile 1494 |
---|
while($post = $db->fetch_array($query)) { $postdate = my_date('relative', $post['dateline']);
|
while($post = $db->fetch_array($query)) { $postdate = my_date('relative', $post['dateline']);
|
| $post['username'] = htmlspecialchars_uni($post['username']);
|
$parser_options = array( "allow_html" => $forum['allowhtml'],
| $parser_options = array( "allow_html" => $forum['allowhtml'],
|
Zeile 1346 | Zeile 1513 |
---|
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");
$plugins->run_hooks("moderation_split");
| $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
$plugins->run_hooks("moderation_split");
|
Zeile 1367 | Zeile 1536 |
---|
$plugins->run_hooks("moderation_do_split");
|
$plugins->run_hooks("moderation_do_split");
|
$mybb->input['splitpost'] = $mybb->get_input('splitpost', 2);
| $mybb->input['splitpost'] = $mybb->get_input('splitpost', MyBB::INPUT_ARRAY);
|
if(empty($mybb->input['splitpost'])) { error($lang->error_nosplitposts);
| if(empty($mybb->input['splitpost'])) { error($lang->error_nosplitposts);
|
Zeile 1387 | Zeile 1556 |
---|
if(!empty($mybb->input['moveto'])) {
|
if(!empty($mybb->input['moveto'])) {
|
$moveto = $mybb->get_input('moveto', 1);
| $moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);
|
} else {
| } else {
|
Zeile 1418 | Zeile 1587 |
---|
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":
|
// 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(); }
|
Zeile 1432 | Zeile 1605 |
---|
$moderation->remove_thread_subscriptions($tid, true);
log_moderator_action($modlogdata, $lang->removed_subscriptions);
|
$moderation->remove_thread_subscriptions($tid, true);
log_moderator_action($modlogdata, $lang->removed_subscriptions);
|
|
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_removed_subscriptions); break;
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_removed_subscriptions); break;
|
Zeile 1441 | Zeile 1614 |
---|
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'))
|
Zeile 1453 | Zeile 1626 |
---|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'candeletethreads'))
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'candeletethreads'))
|
{ error_no_permission();
| { error_no_permission();
|
} } if(count($threads) < 1)
| } } if(count($threads) < 1)
|
Zeile 1465 | Zeile 1638 |
---|
$inlineids = implode("|", $threads); if($mybb->get_input('inlinetype') == 'search') {
|
$inlineids = implode("|", $threads); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 1496 | Zeile 1669 |
---|
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', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 1507 | Zeile 1680 |
---|
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'])) { // 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();
| 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')) { error_no_permission(); } } else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads')) { error_no_permission();
|
} }
if(count($threads) < 1)
|
} }
if(count($threads) < 1)
|
{
| {
|
error($lang->error_inline_nothreadsselected);
|
error($lang->error_inline_nothreadsselected);
|
}
$moderation->open_threads($threads);
| }
$moderation->open_threads($threads);
|
log_moderator_action($modlogdata, $lang->multi_opened_threads); if($mybb->get_input('inlinetype') == 'search')
|
log_moderator_action($modlogdata, $lang->multi_opened_threads); if($mybb->get_input('inlinetype') == 'search')
|
{ clearinline($mybb->get_input('searchid', 1), 'search'); }
| { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); }
|
else { clearinline($fid, 'forum');
| else { clearinline($fid, 'forum');
|
Zeile 1560 | Zeile 1733 |
---|
// 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(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1582 | Zeile 1755 |
---|
log_moderator_action($modlogdata, $lang->multi_closed_threads); if($mybb->get_input('inlinetype') == 'search') {
|
log_moderator_action($modlogdata, $lang->multi_closed_threads); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 1624 | Zeile 1797 |
---|
log_moderator_action($modlogdata, $lang->multi_approved_threads); if($mybb->get_input('inlinetype') == 'search') {
|
log_moderator_action($modlogdata, $lang->multi_approved_threads); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 1635 | Zeile 1808 |
---|
break;
// Unapprove threads - Inline moderation
|
break;
// Unapprove threads - Inline moderation
|
case "multiunapprovethreads":
| case "multiunapprovethreads":
|
// 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 1645 | Zeile 1818 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canapproveunapprovethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canapproveunapprovethreads'))
|
{ error_no_permission(); } } else
| { error_no_permission(); } } else
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads'))
| { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canapproveunapprovethreads'))
|
Zeile 1660 | Zeile 1833 |
---|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
}
| }
|
$moderation->unapprove_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
|
$moderation->unapprove_threads($threads, $fid);
log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', 1), 'search'); } else
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
{ clearinline($fid, 'forum'); }
| { clearinline($fid, 'forum'); }
|
Zeile 1684 | Zeile 1857 |
---|
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']))
|
{
| {
|
// 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'))
|
Zeile 1692 | Zeile 1865 |
---|
error_no_permission(); } }
|
error_no_permission(); } }
|
else { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canrestorethreads')) { error_no_permission(); } } if(count($threads) < 1)
| else
|
{
|
{
|
error($lang->error_inline_nothreadsselected);
| $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canrestorethreads')) { error_no_permission(); } } if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
}
|
}
|
$moderation->restore_threads($threads, $fid);
| $moderation->restore_threads($threads);
|
log_moderator_action($modlogdata, $lang->multi_restored_threads); if($mybb->get_input('inlinetype') == 'search') {
|
log_moderator_action($modlogdata, $lang->multi_restored_threads); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else
|
} else
|
{
| {
|
clearinline($fid, 'forum'); } $cache->update_stats();
| clearinline($fid, 'forum'); } $cache->update_stats();
|
Zeile 1731 | Zeile 1904 |
---|
// 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(); } } else { $threads = getids($fid, 'forum');
| { error_no_permission(); } } else { $threads = getids($fid, 'forum');
|
if(!is_moderator($fid, 'cansoftdeletethreads')) { error_no_permission(); }
|
if(!is_moderator($fid, 'cansoftdeletethreads')) { error_no_permission(); }
|
}
| }
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
}
| }
|
|
|
$moderation->soft_delete_threads($threads, $fid);
| $moderation->soft_delete_threads($threads);
|
log_moderator_action($modlogdata, $lang->multi_soft_deleted_threads); if($mybb->get_input('inlinetype') == 'search') {
|
log_moderator_action($modlogdata, $lang->multi_soft_deleted_threads); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else
|
} else
|
{
| {
|
clearinline($fid, 'forum'); } $cache->update_stats();
| clearinline($fid, 'forum'); } $cache->update_stats();
|
Zeile 1764 | Zeile 1937 |
---|
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'));
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->get_input('searchid'), 'search');
| case "multistickthreads":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!empty($mybb->input['searchid'])) { // From search page $threads = getids($mybb->get_input('searchid'), 'search');
|
if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))
|
if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))
|
{ error_no_permission(); } }
| { error_no_permission(); } }
|
else { $threads = getids($fid, 'forum');
| else { $threads = getids($fid, 'forum');
|
Zeile 1785 | Zeile 1958 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
}
| }
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
}
| }
|
$moderation->stick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_stuck_threads); if($mybb->get_input('inlinetype') == 'search') {
|
$moderation->stick_threads($threads);
log_moderator_action($modlogdata, $lang->multi_stuck_threads); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 1806 | Zeile 1979 |
---|
break;
// Unstick threads - Inline moderaton
|
break;
// Unstick threads - Inline moderaton
|
case "multiunstickthreads":
| case "multiunstickthreads":
|
// 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 1816 | Zeile 1989 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))
|
{ error_no_permission(); } } else
| { error_no_permission(); } } else
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads'))
| { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canstickunstickthreads'))
|
Zeile 1831 | Zeile 2004 |
---|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
if(count($threads) < 1) { error($lang->error_inline_nothreadsselected);
|
}
| }
|
$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', 1), 'search'); } else
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
{ clearinline($fid, 'forum'); }
| { clearinline($fid, 'forum'); }
|
Zeile 1876 | Zeile 2049 |
---|
$inlineids = implode("|", $threads); if($mybb->get_input('inlinetype') == 'search') {
|
$inlineids = implode("|", $threads); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 1894 | Zeile 2067 |
---|
// 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', 1);
| $moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);
|
$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 1908 | Zeile 2081 |
---|
$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();
| error($lang->error_movetononmodforum);
|
}
$newforum = get_forum($moveto);
| }
$newforum = get_forum($moveto);
|
Zeile 1948 | Zeile 2121 |
---|
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') {
|
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 2007 | Zeile 2180 |
---|
// Otherwise we're just deleting from showthread.php else {
|
// Otherwise we're just deleting from showthread.php else {
|
$query = $db->simple_select("posts", "*", "tid='$tid'");
| $query = $db->simple_select("posts", "pid", "tid = $tid");
|
$numposts = $db->num_rows($query); if(!$numposts) {
| $numposts = $db->num_rows($query); if(!$numposts) {
|
Zeile 2104 | Zeile 2277 |
---|
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') {
|
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 2123 | Zeile 2296 |
---|
// 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'));
|
$mergepost = $mybb->get_input('mergepost', 2);
| $mergepost = $mybb->get_input('mergepost', MyBB::INPUT_ARRAY);
|
if(count($mergepost) <= 1) { error($lang->error_nomergeposts);
| if(count($mergepost) <= 1) { error($lang->error_nomergeposts);
|
Zeile 2216 | Zeile 2389 |
---|
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') {
|
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 2311 | Zeile 2484 |
---|
if(isset($mybb->input['moveto'])) {
|
if(isset($mybb->input['moveto'])) {
|
$moveto = $mybb->get_input('moveto', 1);
| $moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);
|
} else {
| } else {
|
Zeile 2357 | Zeile 2530 |
---|
error_no_permission(); } $posts = array_map('intval', $posts);
|
error_no_permission(); } $posts = array_map('intval', $posts);
|
$pidin = implode(',', $posts);
// Make sure that we are not moving posts in a thread with one post // Select number of posts in each thread that the moved post is in $query = $db->query(" 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 moving 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
| $pidin = implode(',', $posts);
// Make sure that we are not moving posts in a thread with one post // Select number of posts in each thread that the moved post is in $query = $db->query(" 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 moving 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)
| 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)
|
Zeile 2399 | Zeile 2572 |
---|
{ // One or more threads do not have posts after splitting error($lang->error_cantmoveall);
|
{ // One or more threads do not have posts after splitting error($lang->error_cantmoveall);
|
}
| }
|
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') {
|
$inlineids = implode("|", $posts); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 2420 | Zeile 2593 |
---|
// 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'));
| // explode at # sign in a url (indicates a name reference) and reassign to the url $realurl = explode("#", $mybb->get_input('threadurl'));
|
Zeile 2465 | Zeile 2640 |
---|
if(!empty($parameters['pid']) && empty($parameters['tid'])) {
|
if(!empty($parameters['pid']) && empty($parameters['tid'])) {
|
$query = $db->simple_select("posts", "*", "pid='".(int)$parameters['pid']."'");
| $query = $db->simple_select("posts", "tid", "pid='".(int)$parameters['pid']."'");
|
$post = $db->fetch_array($query); $newtid = $post['tid']; }
| $post = $db->fetch_array($query); $newtid = $post['tid']; }
|
Zeile 2521 | Zeile 2696 |
---|
// Make sure that we are not moving posts in a thread with one post // Select number of posts in each thread that the moved post is in
|
// Make sure that we are not moving posts in a thread with one post // Select number of posts in each thread that the moved post is in
|
$query = $db->query("
| $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)
|
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 ");
| GROUP BY p.tid, p.pid ");
|
$threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) {
| $threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) {
|
Zeile 2566 | Zeile 2741 |
---|
$pid_list = implode(', ', $posts); $lang->move_selective_posts = $lang->sprintf($lang->move_selective_posts, $pid_list, $newtid); log_moderator_action($modlogdata, $lang->move_selective_posts);
|
$pid_list = implode(', ', $posts); $lang->move_selective_posts = $lang->sprintf($lang->move_selective_posts, $pid_list, $newtid); log_moderator_action($modlogdata, $lang->move_selective_posts);
|
|
|
moderation_redirect(get_thread_link($newtid), $lang->redirect_moveposts); break;
| moderation_redirect(get_thread_link($newtid), $lang->redirect_moveposts); break;
|
Zeile 2575 | Zeile 2750 |
---|
// 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($mybb->get_input('inlinetype') == 'search') {
| if($mybb->get_input('inlinetype') == 'search') {
|
$posts = getids($mybb->get_input('searchid'), 'search'); } else
| $posts = getids($mybb->get_input('searchid'), 'search'); } else
|
Zeile 2587 | Zeile 2762 |
---|
if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
}
| }
|
if(!is_moderator_by_pids($posts, "canapproveunapproveposts")) { error_no_permission();
| if(!is_moderator_by_pids($posts, "canapproveunapproveposts")) { error_no_permission();
|
Zeile 2598 | Zeile 2773 |
---|
foreach($posts as $pid) { $pids[] = (int)$pid;
|
foreach($posts as $pid) { $pids[] = (int)$pid;
|
}
| }
|
$moderation->approve_posts($pids);
log_moderator_action($modlogdata, $lang->multi_approve_posts); if($mybb->get_input('inlinetype') == 'search')
|
$moderation->approve_posts($pids);
log_moderator_action($modlogdata, $lang->multi_approve_posts); if($mybb->get_input('inlinetype') == 'search')
|
{ clearinline($mybb->get_input('searchid', 1), 'search'); }
| { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); }
|
else { clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved);
|
else { clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved);
|
break;
| break;
|
// Unapprove posts - Inline moderation case "multiunapproveposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
// 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')
|
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'); }
| $posts = getids($tid, 'thread'); }
|
Zeile 2636 | Zeile 2811 |
---|
$pids = array();
if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))
|
$pids = array();
if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))
|
{
| {
|
error_no_permission(); } foreach($posts as $pid) { $pids[] = (int)$pid;
|
error_no_permission(); } foreach($posts as $pid) { $pids[] = (int)$pid;
|
}
| }
|
$moderation->unapprove_posts($pids);
log_moderator_action($modlogdata, $lang->multi_unapprove_posts); if($mybb->get_input('inlinetype') == 'search')
|
$moderation->unapprove_posts($pids);
log_moderator_action($modlogdata, $lang->multi_unapprove_posts); if($mybb->get_input('inlinetype') == 'search')
|
{ clearinline($mybb->get_input('searchid', 1), 'search');
| { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 2659 | Zeile 2834 |
---|
break;
// Restore posts - Inline moderation
|
break;
// Restore posts - Inline moderation
|
case "multirestoreposts":
| case "multirestoreposts":
|
// 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 2678 | Zeile 2853 |
---|
}
if(!is_moderator_by_pids($posts, "canrestoreposts"))
|
}
if(!is_moderator_by_pids($posts, "canrestoreposts"))
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 2693 | Zeile 2868 |
---|
log_moderator_action($modlogdata, $lang->multi_restore_posts); if($mybb->get_input('inlinetype') == 'search') {
|
log_moderator_action($modlogdata, $lang->multi_restore_posts); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 2704 | Zeile 2879 |
---|
// Soft delete posts - Inline moderation case "multisoftdeleteposts":
|
// Soft delete posts - Inline moderation case "multisoftdeleteposts":
|
| |
// 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($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search');
|
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search');
|
} else
| } else
|
{ $posts = getids($tid, 'thread'); }
| { $posts = getids($tid, 'thread'); }
|
Zeile 2728 | Zeile 2902 |
---|
error_no_permission(); } foreach($posts as $pid)
|
error_no_permission(); } foreach($posts as $pid)
|
{
| {
|
$pids[] = (int)$pid; }
|
$pids[] = (int)$pid; }
|
|
|
$moderation->soft_delete_posts($pids);
|
$moderation->soft_delete_posts($pids);
|
log_moderator_action($modlogdata, $lang->multi_soft_delete_posts);
| log_moderator_action($modlogdata, $lang->multi_soft_delete_posts);
|
if($mybb->get_input('inlinetype') == 'search') {
|
if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else
|
} else
|
{
| {
|
clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postssoftdeleted);
| clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postssoftdeleted);
|
Zeile 2750 | Zeile 2924 |
---|
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 2810 | Zeile 2984 |
---|
foreach(array($user['regip'], $user['lastip']) as $ip) { $ip = my_inet_ntop($db->unescape_binary($ip));
|
foreach(array($user['regip'], $user['lastip']) as $ip) { $ip = my_inet_ntop($db->unescape_binary($ip));
|
$query = $db->simple_select("banfilters", "*", "type = '1' AND filter = '".$db->escape_string($ip)."'");
| $query = $db->simple_select("banfilters", "type", "type = 1 AND filter = '".$db->escape_string($ip)."'");
|
if($db->num_rows($query) == 0) { $insert = array(
| if($db->num_rows($query) == 0) { $insert = array(
|
Zeile 2827 | Zeile 3001 |
---|
$cache->update_banned(); $cache->update_bannedips();
|
$cache->update_banned(); $cache->update_bannedips();
|
| $cache->update_awaitingactivation();
|
// Update reports cache $cache->update_reportedcontent();
| // Update reports cache $cache->update_reportedcontent();
|
Zeile 2839 | Zeile 3014 |
---|
// Submit the user to stop forum spam if(!empty($mybb->settings['purgespammerapikey'])) {
|
// Submit the user to stop forum spam if(!empty($mybb->settings['purgespammerapikey'])) {
|
$sfs = @fetch_remote_file("http://stopforumspam.com/add.php?username=" . urlencode($user['username']) . "&ip_addr=" . urlencode($user['lastip']) . "&email=" . urlencode($user['email']) . "&api_key=" . urlencode($mybb->settings['purgespammerapikey']));
| $sfs = @fetch_remote_file("http://stopforumspam.com/add.php?username=" . urlencode($user['username']) . "&ip_addr=" . urlencode(my_inet_ntop($db->unescape_binary($user['lastip']))) . "&email=" . urlencode($user['email']) . "&api_key=" . urlencode($mybb->settings['purgespammerapikey']));
|
}
log_moderator_action(array('uid' => $uid, 'username' => $user['username']), $lang->purgespammer_modlog);
| }
log_moderator_action(array('uid' => $uid, 'username' => $user['username']), $lang->purgespammer_modlog);
|
Zeile 2847 | Zeile 3022 |
---|
if($user_deleted) { redirect($mybb->settings['bburl'], $lang->purgespammer_success);
|
if($user_deleted) { redirect($mybb->settings['bburl'], $lang->purgespammer_success);
|
} else {
| } else {
|
redirect(get_profile_link($uid), $lang->purgespammer_success); } } else if($mybb->input['action'] == "purgespammer")
|
redirect(get_profile_link($uid), $lang->purgespammer_success); } } else if($mybb->input['action'] == "purgespammer")
|
{
| {
|
$plugins->run_hooks("moderation_purgespammer_show");
add_breadcrumb($lang->purgespammer);
|
$plugins->run_hooks("moderation_purgespammer_show");
add_breadcrumb($lang->purgespammer);
|
$lang->purgespammer_purge = $lang->sprintf($lang->purgespammer_purge, $user['username']);
| $lang->purgespammer_purge = $lang->sprintf($lang->purgespammer_purge, htmlspecialchars_uni($user['username']));
|
if($mybb->settings['purgespammerbandelete'] == "ban")
|
if($mybb->settings['purgespammerbandelete'] == "ban")
|
{
| {
|
$lang->purgespammer_purge_desc = $lang->sprintf($lang->purgespammer_purge_desc, $lang->purgespammer_ban); } else
| $lang->purgespammer_purge_desc = $lang->sprintf($lang->purgespammer_purge_desc, $lang->purgespammer_ban); } else
|
Zeile 2874 | Zeile 3049 |
---|
default: require_once MYBB_ROOT."inc/class_custommoderation.php"; $custommod = new CustomModeration;
|
default: require_once MYBB_ROOT."inc/class_custommoderation.php"; $custommod = new CustomModeration;
|
$tool = $custommod->tool_info($mybb->get_input('action', 1));
| $tool = $custommod->tool_info($mybb->get_input('action', MyBB::INPUT_INT));
|
if($tool !== false) { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$options = my_unserialize($tool['threadoptions']);
|
if($tool !== false) { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
$options = my_unserialize($tool['threadoptions']);
|
if($tool['groups'] != -1 && !is_member($tool['groups']))
| if(!is_member($tool['groups']))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 2893 | Zeile 3068 |
---|
$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'); $url = htmlspecialchars_uni($mybb->get_input('url'));
|
$plugins->run_hooks('moderation_confirmation');
eval('$page = "'.$templates->get('moderation_confirmation').'";');
| $plugins->run_hooks('moderation_confirmation');
eval('$page = "'.$templates->get('moderation_confirmation').'";');
|
Zeile 2900 | Zeile 3080 |
---|
output_page($page); exit; }
|
output_page($page); exit; }
|
| $tool['name'] = htmlspecialchars_uni($tool['name']);
|
if($tool['type'] == 't' && $mybb->get_input('modtype') == 'inlinethread') { if($mybb->get_input('inlinetype') == 'search') { $tids = getids($mybb->get_input('searchid'), 'search');
|
if($tool['type'] == 't' && $mybb->get_input('modtype') == 'inlinethread') { if($mybb->get_input('inlinetype') == 'search') { $tids = getids($mybb->get_input('searchid'), 'search');
|
}
| }
|
else { $tids = getids($fid, "forum");
| else { $tids = getids($fid, "forum");
|
Zeile 2922 | Zeile 3104 |
---|
$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); }
|
$custommod->execute($mybb->get_input('action', 1), $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') {
|
$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', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
$lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']); $return_url = htmlspecialchars_uni($mybb->get_input('url')); redirect($return_url, $lang->redirect_customtool_search);
|
$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);
|
}
| }
|
else { clearinline($fid, "forum");
| else { clearinline($fid, "forum");
|
Zeile 2945 | Zeile 3127 |
---|
break; } elseif($tool['type'] == 't' && $mybb->get_input('modtype') == 'thread')
|
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 2957 | Zeile 3139 |
---|
error($lang->error_movetocategory); }
|
error($lang->error_movetocategory); }
|
$ret = $custommod->execute($mybb->get_input('action', 1), $tid);
| $ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tid);
|
$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool); if($ret == 'forum')
| $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool); if($ret == 'forum')
|
Zeile 2998 | Zeile 3180 |
---|
'order_by' => 'dateline', 'order_dir' => 'asc' );
|
'order_by' => 'dateline', 'order_dir' => 'asc' );
|
$query = $db->simple_select("posts", "DISTINCT tid", "pid IN (".implode(',',$pids).")", $options);
| $query = $db->simple_select("posts", "DISTINCT tid, dateline", "pid IN (".implode(',',$pids).")", $options);
|
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', 1), $tids, $pids);
| $ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids, $pids);
|
$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool); if($mybb->get_input('inlinetype') == 'search') {
|
$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']); log_moderator_action($modlogdata, $lang->custom_tool); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
$lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']); $return_url = htmlspecialchars_uni($mybb->get_input('url')); redirect($return_url, $lang->redirect_customtool_search);
| $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);
|
Zeile 3036 | Zeile 3218 |
---|
break; }
|
break; }
|
// Some little handy functions for our inline moderation
| /** * Some little handy functions for our inline moderation * * @param int $id * @param string $type * * @return array */
|
function getids($id, $type) { global $mybb;
| function getids($id, $type) { global $mybb;
|
Zeile 3068 | Zeile 3257 |
---|
return $newids; }
|
return $newids; }
|
| /** * @param int $id * @param string $type * * @return array */
|
function getallids($id, $type) { global $db, $mybb;
| function getallids($id, $type) { global $db, $mybb;
|
Zeile 3103 | Zeile 3298 |
---|
} else if($type == 'search') {
|
} else if($type == 'search') {
|
$query = $db->simple_select("searchlog", "*", "sid='".$db->escape_string($id)."' AND uid='{$mybb->user['uid']}'", 1);
| $query = $db->simple_select("searchlog", "resulttype, posts, threads", "sid='".$db->escape_string($id)."' AND uid='{$mybb->user['uid']}'", 1);
|
$searchlog = $db->fetch_array($query); if($searchlog['resulttype'] == 'posts') {
| $searchlog = $db->fetch_array($query); if($searchlog['resulttype'] == 'posts') {
|
Zeile 3129 | Zeile 3324 |
---|
return $ids; }
|
return $ids; }
|
| /** * @param int $id * @param string $type */
|
function clearinline($id, $type) { my_unsetcookie("inlinemod_".$type.$id);
|
function clearinline($id, $type) { my_unsetcookie("inlinemod_".$type.$id);
|
my_unsetcookie("inlinemod_".$type.$id."_removed");
| my_unsetcookie("inlinemod_{$type}{$id}_removed");
|
}
|
}
|
| /** * @param int $id * @param string $type */
|
function extendinline($id, $type) {
|
function extendinline($id, $type) {
|
my_setcookie("inlinemod_$type$id", '', TIME_NOW+3600); my_setcookie("inlinemod_$type$id_removed", '', TIME_NOW+3600);
| my_setcookie("inlinemod_{$type}{$id}", '', TIME_NOW+3600); my_setcookie("inlinemod_{$type}{$id}_removed", '', TIME_NOW+3600);
|
}
/**
| }
/**
|
Zeile 3147 | Zeile 3350 |
---|
* 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. *
|
* 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 Array of post IDs * @param string Permission to check * @returns bool True if moderator of all; false otherwise
| * @param array $posts Array of post IDs * @param string $permission Permission to check * @return bool True if moderator of all; false otherwise
|
*/ function is_moderator_by_pids($posts, $permission='') {
| */ function is_moderator_by_pids($posts, $permission='') {
|
Zeile 3191 | Zeile 3394 |
---|
* Note: If no threads are specified, this function will return true. It is the * responsibility of the calling script to error-check this case if necessary. *
|
* Note: If no threads are specified, this function will return true. It is the * responsibility of the calling script to error-check this case if necessary. *
|
* @param array Array of thread IDs * @param string Permission to check * @returns 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='') {
| */ function is_moderator_by_tids($threads, $permission='') {
|
Zeile 3231 | Zeile 3434 |
---|
/** * Special redirect that takes a return URL into account
|
/** * Special redirect that takes a return URL into account
|
* @param string URL * @param string Message * @param string Title
| * @param string $url URL * @param string $message Message * @param string $title Title
|
*/ function moderation_redirect($url, $message="", $title="") {
| */ function moderation_redirect($url, $message="", $title="") {
|