Zeile 12 | Zeile 12 |
---|
define('THIS_SCRIPT', 'moderation.php');
$templatelist = 'changeuserbox,loginbox,moderation_delayedmoderation_custommodtool,moderation_delayedmodaction_notes,moderation_delayedmoderation_merge,moderation_delayedmoderation_move';
|
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_delayedmoderation,moderation_deletethread,moderation_deletepoll,moderation_mergeposts_post,moderation_viewthreadnotes,moderation_confirmation';
|
$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 .= ',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';
|
Zeile 30 | Zeile 30 |
---|
$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);
|
if($pid) {
| if($pid) {
|
Zeile 67 | Zeile 67 |
---|
$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 132 | Zeile 128 |
---|
error_no_permission(); }
|
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)
|
{
| {
|
moderation_redirect(get_forum_link($fid), $lang->redirect_delayed_moderation_cancelled);
|
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); } break;
| moderation_redirect("moderation.php?action=delayedmoderation&tid={$tid}&my_post_key={$mybb->post_code}", $lang->redirect_delayed_moderation_cancelled); } break;
|
Zeile 148 | Zeile 146 |
---|
// 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('date_day', 1))
| if(!$mybb->get_input('date_day', MyBB::INPUT_INT))
|
{ $mybb->input['date_day'] = date('d', TIME_NOW); }
|
{ $mybb->input['date_day'] = date('d', TIME_NOW); }
|
if(!$mybb->get_input('date_month', 1))
| if(!$mybb->get_input('date_month', MyBB::INPUT_INT))
|
{ $mybb->input['date_month'] = date('m', TIME_NOW);
|
{ $mybb->input['date_month'] = date('m', TIME_NOW);
|
}
| }
|
// 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'])) {
|
Zeile 167 | Zeile 165 |
---|
if($mybb->get_input('inlinetype') == 'search') { $tids = getids($mybb->get_input('searchid'), 'search');
|
if($mybb->get_input('inlinetype') == 'search') { $tids = getids($mybb->get_input('searchid'), 'search');
|
}
| }
|
else {
|
else {
|
$fid = $mybb->get_input('fid', 1);
| $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
$tids = getids($fid, "forum"); } if(count($tids) < 1)
| $tids = getids($fid, "forum"); } if(count($tids) < 1)
|
Zeile 179 | Zeile 177 |
---|
}
$mybb->input['tids'] = $tids;
|
}
$mybb->input['tids'] = $tids;
|
}
add_breadcrumb($lang->delayed_moderation);
| }
add_breadcrumb($lang->delayed_moderation);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
}
| }
|
$errors = array(); $customthreadtools = "";
| $errors = array(); $customthreadtools = "";
|
Zeile 219 | Zeile 217 |
---|
eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";"); }
|
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($mybb->input['action'] == "do_delayedmoderation" && $mybb->request_method == "post") {
|
Zeile 227 | Zeile 225 |
---|
{ $mybb->input['type'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_type;
|
{ $mybb->input['type'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_type;
|
}
| }
|
if($mybb->input['type'] == 'move' && (!isset($mybb->input['delayedmoderation']['method']) || !in_array($mybb->input['delayedmoderation']['method'], array('move', 'redirect', 'copy')))) { $mybb->input['delayedmoderation']['method'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_method;
|
if($mybb->input['type'] == 'move' && (!isset($mybb->input['delayedmoderation']['method']) || !in_array($mybb->input['delayedmoderation']['method'], array('move', 'redirect', 'copy')))) { $mybb->input['delayedmoderation']['method'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_method;
|
}
| }
|
if($mybb->input['type'] == 'move') { $newforum = get_forum($fid);
| if($mybb->input['type'] == 'move') { $newforum = get_forum($fid);
|
Zeile 257 | Zeile 255 |
---|
if($mybb->input['date_year'] < gmdate('Y', TIME_NOW)) { $errors[] = $lang->error_delayedmoderation_invalid_date_year;
|
if($mybb->input['date_year'] < gmdate('Y', TIME_NOW)) { $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 270 | Zeile 268 |
---|
$date_time[0] = '00'; } }
|
$date_time[0] = '00'; } }
|
$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 = mktime((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));
|
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);
if(!empty($mybb->input['tid']))
|
$rundate_format = my_date('relative', $rundate, '', 2); $lang->redirect_delayed_moderation_thread = $lang->sprintf($lang->redirect_delayed_moderation_thread, $rundate_format);
if(!empty($mybb->input['tid']))
|
{
| {
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_delayed_moderation_thread); } else
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_delayed_moderation_thread); } else
|
Zeile 315 | Zeile 315 |
---|
foreach($allowed_types as $type) { $type_selected[$type] = '';
|
foreach($allowed_types as $type) { $type_selected[$type] = '';
|
}
| }
|
$type_selected[$mybb->get_input('type')] = "checked=\"checked\""; $method_selected = array('move' => '', 'redirect' => '', 'copy' => ''); if(isset($mybb->input['delayedmoderation']['method'])) { $method_selected[$mybb->input['delayedmoderation']['method']] = "checked=\"checked\"";
|
$type_selected[$mybb->get_input('type')] = "checked=\"checked\""; $method_selected = array('move' => '', 'redirect' => '', 'copy' => ''); if(isset($mybb->input['delayedmoderation']['method'])) { $method_selected[$mybb->input['delayedmoderation']['method']] = "checked=\"checked\"";
|
}
| }
|
foreach(array('redirect_expire', 'new_forum', 'subject', 'threadurl') as $value) { if(!isset($mybb->input['delayedmoderation'][$value]))
| foreach(array('redirect_expire', 'new_forum', 'subject', 'threadurl') as $value) { if(!isset($mybb->input['delayedmoderation'][$value]))
|
Zeile 413 | Zeile 413 |
---|
foreach($tids as $like) { $where_array[] = "','||d.tids||',' LIKE '%,".$db->escape_string($like).",%'";
|
foreach($tids as $like) { $where_array[] = "','||d.tids||',' LIKE '%,".$db->escape_string($like).",%'";
|
} $where_statement = implode(" OR ", $where_array);
| } $where_statement = implode(" OR ", $where_array);
|
break; default: foreach($tids as $like)
| break; default: foreach($tids as $like)
|
Zeile 439 | Zeile 439 |
---|
{ case "pgsql": case "sqlite":
|
{ case "pgsql": case "sqlite":
|
$query = $db->query(" SELECT d.*, u.username, f.name AS fname FROM ".TABLE_PREFIX."delayedmoderation d
| $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},%'
|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid) WHERE ','||d.tids||',' LIKE '%,{$tid},%'
|
ORDER BY d.dateline DESC LIMIT 0, 20 ");
| ORDER BY d.dateline DESC LIMIT 0, 20 ");
|
break; default: $query = $db->query("
| break; default: $query = $db->query("
|
Zeile 459 | Zeile 459 |
---|
ORDER BY d.dateline DESC LIMIT 0, 20 ");
|
ORDER BY d.dateline DESC LIMIT 0, 20 ");
|
} }
| } }
|
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']);
|
Zeile 489 | Zeile 489 |
---|
if($delayedmod['inputs']['method'] == "redirect") { if((int)$delayedmod['inputs']['redirect_expire'] == 0)
|
if($delayedmod['inputs']['method'] == "redirect") { if((int)$delayedmod['inputs']['redirect_expire'] == 0)
|
{
| {
|
$redirect_expire_bit = $lang->redirect_forever; } else
| $redirect_expire_bit = $lang->redirect_forever; } else
|
Zeile 506 | Zeile 506 |
---|
}
eval("\$delayedmods .= \"".$templates->get("moderation_delayedmodaction_notes")."\";");
|
}
eval("\$delayedmods .= \"".$templates->get("moderation_delayedmodaction_notes")."\";");
|
$trow = alt_trow(); } if(!$delayedmods) {
| $trow = alt_trow(); } if(!$delayedmods) {
|
$cols = 5; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";"); }
$url = '';
|
$cols = 5; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";"); }
$url = '';
|
if($mybb->get_input('tid', 1)) {
| if($mybb->get_input('tid', MyBB::INPUT_INT)) {
|
$lang->threads = $lang->thread; $threads = "<a href=\"".get_thread_link($tid)."\">{$thread['subject']}</a>"; eval("\$moderation_delayedmoderation_merge = \"".$templates->get("moderation_delayedmoderation_merge")."\";"); } else
|
$lang->threads = $lang->thread; $threads = "<a href=\"".get_thread_link($tid)."\">{$thread['subject']}</a>"; eval("\$moderation_delayedmoderation_merge = \"".$templates->get("moderation_delayedmoderation_merge")."\";"); } else
|
{
| {
|
if($mybb->get_input('inlinetype') == 'search') { $tids = getids($mybb->get_input('searchid'), 'search');
| if($mybb->get_input('inlinetype') == 'search') { $tids = getids($mybb->get_input('searchid'), 'search');
|
Zeile 533 | Zeile 533 |
---|
$tids = getids($fid, "forum"); } if(count($tids) < 1)
|
$tids = getids($fid, "forum"); } if(count($tids) < 1)
|
{
| {
|
error($lang->error_inline_nothreadsselected); }
$threads = $lang->sprintf($lang->threads_selected, count($tids)); $moderation_delayedmoderation_merge = '';
|
error($lang->error_inline_nothreadsselected); }
$threads = $lang->sprintf($lang->threads_selected, count($tids)); $moderation_delayedmoderation_merge = '';
|
}
| }
|
$mybb->input['redirect_expire'] = $mybb->get_input('redirect_expire'); eval("\$moderation_delayedmoderation_move = \"".$templates->get("moderation_delayedmoderation_move")."\";");
| $mybb->input['redirect_expire'] = $mybb->get_input('redirect_expire'); eval("\$moderation_delayedmoderation_move = \"".$templates->get("moderation_delayedmoderation_move")."\";");
|
Zeile 548 | Zeile 548 |
---|
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"'; }
|
Zeile 557 | Zeile 557 |
---|
$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)
|
{
| {
|
$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"'; }
|
}
| }
|
eval('$datemonth = "'.$templates->get('moderation_delayedmoderation_date_month').'";');
|
eval('$datemonth = "'.$templates->get('moderation_delayedmoderation_date_month').'";');
|
Zeile 584 | Zeile 584 |
---|
if(!is_moderator($fid, "canopenclosethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canopenclosethreads")) { error_no_permission();
|
}
| }
|
if($thread['closed'] == 1) {
| if($thread['closed'] == 1) {
|
Zeile 601 | Zeile 601 |
---|
$lang->mod_process = $lang->sprintf($lang->mod_process, $openclose);
|
$lang->mod_process = $lang->sprintf($lang->mod_process, $openclose);
|
log_moderator_action($modlogdata, $lang->mod_process);
moderation_redirect(get_thread_link($thread['tid']), $redirect); break;
| log_moderator_action($modlogdata, $lang->mod_process);
moderation_redirect(get_thread_link($thread['tid']), $redirect); break;
|
// Stick or unstick that post to the top bab! case "stick": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canstickunstickthreads"))
|
// Stick or unstick that post to the top bab! case "stick": // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canstickunstickthreads"))
|
{ error_no_permission(); }
$plugins->run_hooks("moderation_stick");
| { error_no_permission(); }
$plugins->run_hooks("moderation_stick");
|
if($thread['sticky'] == 1) { $stuckunstuck = $lang->unstuck; $redirect = $lang->redirect_unstickthread;
|
if($thread['sticky'] == 1) { $stuckunstuck = $lang->unstuck; $redirect = $lang->redirect_unstickthread;
|
$moderation->unstick_threads($tid);
| $moderation->unstick_threads($tid);
|
} else {
| } else {
|
Zeile 634 | Zeile 634 |
---|
$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;
|
Zeile 650 | Zeile 650 |
---|
}
$plugins->run_hooks("moderation_removeredirects");
|
}
$plugins->run_hooks("moderation_removeredirects");
|
|
|
$moderation->remove_redirects($tid);
log_moderator_action($modlogdata, $lang->redirects_removed);
| $moderation->remove_redirects($tid);
log_moderator_action($modlogdata, $lang->redirects_removed);
|
Zeile 719 | Zeile 719 |
---|
$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 747 |
---|
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 789 | Zeile 789 |
---|
// 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); break;
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved); break;
|
Zeile 824 | Zeile 824 |
---|
$lang->thread_restored = $lang->sprintf($lang->thread_restored, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_restored);
|
$lang->thread_restored = $lang->sprintf($lang->thread_restored, $thread['subject']); log_moderator_action($modlogdata, $lang->thread_restored);
|
$moderation->restore_threads($tid, $fid);
| $moderation->restore_threads($tid);
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored); break;
// Soft delete a thread case "softdeletethread":
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored); break;
// Soft delete a thread case "softdeletethread":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "cansoftdeletethreads"))
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "cansoftdeletethreads"))
|
{
| {
|
error_no_permission(); } $thread = get_thread($tid);
| error_no_permission(); } $thread = get_thread($tid);
|
Zeile 855 | Zeile 855 |
---|
// Move a thread case "move": add_breadcrumb($lang->nav_move);
|
// Move a thread case "move": add_breadcrumb($lang->nav_move);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
|
$plugins->run_hooks("moderation_move");
| $plugins->run_hooks("moderation_move");
|
Zeile 869 | Zeile 869 |
---|
// Let's get this thing moving! case "do_move":
|
// Let's get this thing moving! case "do_move":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
$moveto = $mybb->get_input('moveto', 1);
| $moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);
|
$method = $mybb->get_input('method');
if(!is_moderator($fid, "canmanagethreads"))
| $method = $mybb->get_input('method');
if(!is_moderator($fid, "canmanagethreads"))
|
Zeile 882 | Zeile 882 |
---|
} // 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();
|
} $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_no_permission();
|
}
| }
|
$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);
|
}
| }
|
if($method != "copy" && $thread['fid'] == $moveto) { error($lang->error_movetosameforum); }
|
if($method != "copy" && $thread['fid'] == $moveto) { 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 938 | Zeile 940 |
---|
{ error($lang->error_nomember); }
|
{ 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']);
|
Zeile 1083 | Zeile 1087 |
---|
} } 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 />"; }
|
$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 />"; }
|
|
|
eval("\$delayedmods .= \"".$templates->get("moderation_threadnotes_delayedmodaction")."\";"); $trow = alt_trow(); } if(!$delayedmods)
|
eval("\$delayedmods .= \"".$templates->get("moderation_threadnotes_delayedmodaction")."\";"); $trow = alt_trow(); } if(!$delayedmods)
|
{
| {
|
$cols = 4; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";");
|
$cols = 4; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";");
|
}
$plugins->run_hooks("moderation_threadnotes");
| }
$plugins->run_hooks("moderation_threadnotes");
|
eval("\$threadnotes = \"".$templates->get("moderation_threadnotes")."\";"); output_page($threadnotes);
|
eval("\$threadnotes = \"".$templates->get("moderation_threadnotes")."\";"); output_page($threadnotes);
|
break;
| break;
|
// Update the thread notes! case "do_threadnotes":
| // Update the thread notes! case "do_threadnotes":
|
Zeile 1122 | Zeile 1126 |
---|
); $db->update_query("threads", $sqlarray, "tid='$tid'"); moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadnotesupdated);
|
); $db->update_query("threads", $sqlarray, "tid='$tid'"); moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadnotesupdated);
|
break;
| break;
|
// 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();
|
}
| }
|
$post['ipaddress'] = my_inet_ntop($db->unescape_binary($post['ipaddress'])); $hostname = @gethostbyaddr($post['ipaddress']);
| $post['ipaddress'] = my_inet_ntop($db->unescape_binary($post['ipaddress'])); $hostname = @gethostbyaddr($post['ipaddress']);
|
Zeile 1148 | Zeile 1152 |
---|
$ipaddress = $post['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";"); }
|
$ipaddress = $post['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";"); }
|
| $plugins->run_hooks('moderation_getip');
|
eval("\$getip = \"".$templates->get("moderation_getip")."\";"); output_page($getip);
| eval("\$getip = \"".$templates->get("moderation_getip")."\";"); output_page($getip);
|
Zeile 1175 | Zeile 1181 |
---|
$hostname = $lang->resolve_fail; }
|
$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)
|
{
| {
|
$ipaddress = $pm['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
|
$ipaddress = $pm['ipaddress']; eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
|
}
| }
$plugins->run_hooks('moderation_getpmip');
|
eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";"); output_page($getpmip);
| eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";"); output_page($getpmip);
|
Zeile 1195 | Zeile 1201 |
---|
// Merge threads case "merge": add_breadcrumb($lang->nav_merge);
|
// Merge threads case "merge": add_breadcrumb($lang->nav_merge);
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
| if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
|
$plugins->run_hooks("moderation_merge");
eval("\$merge = \"".$templates->get("moderation_merge")."\";");
| $plugins->run_hooks("moderation_merge");
eval("\$merge = \"".$templates->get("moderation_merge")."\";");
|
Zeile 1207 | Zeile 1213 |
---|
break;
// Let's get those threads together baby! (Merge threads)
|
break;
// Let's get those threads together baby! (Merge threads)
|
case "do_merge":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
$plugins->run_hooks("moderation_do_merge");
// explode at # sign in a url (indicates a name reference) and reassign to the url $realurl = explode("#", $mybb->get_input('threadurl')); $mybb->input['threadurl'] = $realurl[0];
// Are we using an SEO URL? if(substr($mybb->input['threadurl'], -4) == "html") { // Get thread to merge's tid the SEO way preg_match("#thread-([0-9]+)?#i", $mybb->input['threadurl'], $threadmatch); preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
if($threadmatch[1]) { $parameters['tid'] = $threadmatch[1]; }
if($postmatch[1]) { $parameters['pid'] = $postmatch[1]; } } else { // Get thread to merge's tid the normal way $splitloc = explode(".php", $mybb->input['threadurl']); $temp = explode("&", my_substr($splitloc[1], 1));
if(!empty($temp)) { for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2); $parameters[$temp2[0]] = $temp2[1]; } } else { $temp2 = explode("=", $splitloc[1], 2); $parameters[$temp2[0]] = $temp2[1];
| case "do_merge":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
$plugins->run_hooks("moderation_do_merge");
// explode at # sign in a url (indicates a name reference) and reassign to the url $realurl = explode("#", $mybb->get_input('threadurl')); $mybb->input['threadurl'] = $realurl[0];
// Are we using an SEO URL? if(substr($mybb->input['threadurl'], -4) == "html") { // Get thread to merge's tid the SEO way preg_match("#thread-([0-9]+)?#i", $mybb->input['threadurl'], $threadmatch); preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
if($threadmatch[1]) { $parameters['tid'] = $threadmatch[1]; }
if($postmatch[1]) { $parameters['pid'] = $postmatch[1]; } } else { // Get thread to merge's tid the normal way $splitloc = explode(".php", $mybb->input['threadurl']); $temp = explode("&", my_substr($splitloc[1], 1));
if(!empty($temp)) { for($i = 0; $i < count($temp); $i++) { $temp2 = explode("=", $temp[$i], 2); $parameters[$temp2[0]] = $temp2[1]; } } else { $temp2 = explode("=", $splitloc[1], 2); $parameters[$temp2[0]] = $temp2[1];
|
} }
| } }
|
Zeile 1367 | Zeile 1373 |
---|
$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 1393 |
---|
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 1465 | Zeile 1471 |
---|
$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 1502 |
---|
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 1540 | Zeile 1546 |
---|
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 {
| } else {
|
Zeile 1582 | Zeile 1588 |
---|
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 1630 |
---|
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 1667 | Zeile 1673 |
---|
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', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 1705 | Zeile 1711 |
---|
error($lang->error_inline_nothreadsselected); }
|
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 {
|
Zeile 1748 | Zeile 1754 |
---|
error($lang->error_inline_nothreadsselected); }
|
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 {
|
Zeile 1796 | Zeile 1802 |
---|
log_moderator_action($modlogdata, $lang->multi_stuck_threads); if($mybb->get_input('inlinetype') == 'search') {
|
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 1838 | Zeile 1844 |
---|
log_moderator_action($modlogdata, $lang->multi_unstuck_threads); if($mybb->get_input('inlinetype') == 'search') {
|
log_moderator_action($modlogdata, $lang->multi_unstuck_threads); if($mybb->get_input('inlinetype') == 'search') {
|
clearinline($mybb->get_input('searchid', 1), 'search');
| clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
} else {
| } else {
|
Zeile 1876 | Zeile 1882 |
---|
$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 1900 |
---|
// 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 1948 | Zeile 1954 |
---|
$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 2013 |
---|
// 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)
|
{
| {
|
$moderation->delete_thread($tid); mark_reports($tid, "thread"); $url = get_forum_link($fid);
| $moderation->delete_thread($tid); mark_reports($tid, "thread"); $url = get_forum_link($fid);
|
Zeile 2094 | Zeile 2100 |
---|
if($post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0;
|
if($post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0;
|
}
| }
|
$message = $parser->parse_message($post['message'], $parser_options); eval("\$postlist .= \"".$templates->get("moderation_mergeposts_post")."\";"); $altbg = alt_trow();
| $message = $parser->parse_message($post['message'], $parser_options); eval("\$postlist .= \"".$templates->get("moderation_mergeposts_post")."\";"); $altbg = alt_trow();
|
Zeile 2103 | Zeile 2109 |
---|
$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 { clearinline($tid, 'thread');
|
} else { clearinline($tid, 'thread');
|
}
| }
|
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
| $return_url = htmlspecialchars_uni($mybb->get_input('url'));
|
Zeile 2119 | Zeile 2125 |
---|
// Actually merge the posts - Inline moderation case "do_multimergeposts":
|
// Actually merge the posts - Inline moderation case "do_multimergeposts":
|
|
|
// 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)
|
if(count($mergepost) <= 1)
|
{
| {
|
error($lang->error_nomergeposts); }
foreach($mergepost as $pid => $yes)
|
error($lang->error_nomergeposts); }
foreach($mergepost as $pid => $yes)
|
{
| {
|
$postlist[] = (int)$pid; }
|
$postlist[] = (int)$pid; }
|
if(!is_moderator_by_pids($postlist, "canmanagethreads")) { error_no_permission(); }
$masterpid = $moderation->merge_posts($postlist, $tid, $mybb->input['sep']);
| if(!is_moderator_by_pids($postlist, "canmanagethreads")) { error_no_permission(); }
$masterpid = $moderation->merge_posts($postlist, $tid, $mybb->input['sep']);
|
mark_reports($postlist, "posts"); log_moderator_action($modlogdata, $lang->merged_selective_posts); moderation_redirect(get_post_link($masterpid)."#pid$masterpid", $lang->redirect_inline_postsmerged); break;
|
mark_reports($postlist, "posts"); log_moderator_action($modlogdata, $lang->merged_selective_posts); moderation_redirect(get_post_link($masterpid)."#pid$masterpid", $lang->redirect_inline_postsmerged); break;
|
|
|
// Split posts - Inline moderation case "multisplitposts": add_breadcrumb($lang->nav_multi_splitposts);
|
// Split posts - Inline moderation case "multisplitposts": add_breadcrumb($lang->nav_multi_splitposts);
|
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); }
if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission(); } $posts = array_map('intval', $posts); $pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post // Select number of posts in each thread that the splitted post is in $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid "); $threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1)
| if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); }
if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
if(!is_moderator_by_pids($posts, "canmanagethreads")) { error_no_permission(); } $posts = array_map('intval', $posts); $pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post // Select number of posts in each thread that the splitted post is in $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid "); $threads = $pcheck = array(); while($tcheck = $db->fetch_array($query)) { if((int)$tcheck['count'] <= 1)
|
{ error($lang->error_cantsplitonepost); }
| { error($lang->error_cantsplitonepost); }
|
Zeile 2216 | Zeile 2222 |
---|
$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 2268 | Zeile 2274 |
---|
$pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post
|
$pidin = implode(',', $posts);
// Make sure that we are not splitting a thread with one post
|
// Select number of posts in each thread that the splitted post is in $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count
| // Select number of posts in each thread that the splitted post is in $query = $db->query(" SELECT DISTINCT p.tid, COUNT(q.pid) as count
|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid) WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid "); $pcheck = array();
|
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 "); $pcheck = array();
|
while($tcheck = $db->fetch_array($query)) {
| while($tcheck = $db->fetch_array($query)) {
|
if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost);
| if((int)$tcheck['count'] <= 1) { error($lang->error_cantsplitonepost);
|
Zeile 2304 | Zeile 2310 |
---|
} } if(count($pcheck2) != count($pcheck))
|
} } if(count($pcheck2) != count($pcheck))
|
{
| {
|
// One or more threads do not have posts after splitting error($lang->error_cantsplitall);
|
// One or more threads do not have posts after splitting error($lang->error_cantsplitall);
|
}
| }
|
if(isset($mybb->input['moveto']))
|
if(isset($mybb->input['moveto']))
|
{ $moveto = $mybb->get_input('moveto', 1); } else {
| { $moveto = $mybb->get_input('moveto', MyBB::INPUT_INT); } else {
|
$moveto = $fid; }
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
$moveto = $fid; }
$newforum = get_forum($moveto); if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
|
{
| {
|
error($lang->error_invalidforum); }
| error($lang->error_invalidforum); }
|
Zeile 2330 | Zeile 2336 |
---|
$pid_list = implode(', ', $posts); $lang->split_selective_posts = $lang->sprintf($lang->split_selective_posts, $pid_list, $newtid); log_moderator_action($modlogdata, $lang->split_selective_posts);
|
$pid_list = implode(', ', $posts); $lang->split_selective_posts = $lang->sprintf($lang->split_selective_posts, $pid_list, $newtid); log_moderator_action($modlogdata, $lang->split_selective_posts);
|
|
|
moderation_redirect(get_thread_link($newtid), $lang->redirect_threadsplit); break;
| moderation_redirect(get_thread_link($newtid), $lang->redirect_threadsplit); break;
|
Zeile 2341 | Zeile 2347 |
---|
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 { $posts = getids($tid, 'thread');
|
else { $posts = getids($tid, 'thread');
|
}
| }
|
if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
}
| }
|
if(!is_moderator_by_pids($posts, "canmanagethreads"))
|
if(!is_moderator_by_pids($posts, "canmanagethreads"))
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
| }
|
$posts = array_map('intval', $posts);
|
$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 2404 | Zeile 2410 |
---|
$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 2465 | Zeile 2471 |
---|
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']; } elseif(!empty($parameters['tid']))
|
$post = $db->fetch_array($query); $newtid = $post['tid']; } elseif(!empty($parameters['tid']))
|
{
| {
|
$newtid = $parameters['tid']; } else
| $newtid = $parameters['tid']; } else
|
Zeile 2480 | Zeile 2486 |
---|
$newtid = (int)$newtid; $newthread = get_thread($newtid); if(!$newthread)
|
$newtid = (int)$newtid; $newthread = get_thread($newtid); if(!$newthread)
|
{
| {
|
error($lang->error_badmovepostsurl);
|
error($lang->error_badmovepostsurl);
|
}
| }
|
if($newtid == $tid) { // sanity check error($lang->error_movetoself);
|
if($newtid == $tid) { // sanity check error($lang->error_movetoself);
|
}
| }
|
$postlist = explode("|", $mybb->get_input('posts')); $plist = array(); foreach($postlist as $pid)
|
$postlist = explode("|", $mybb->get_input('posts')); $plist = array(); foreach($postlist as $pid)
|
{
| {
|
$pid = (int)$pid; $plist[] = $pid; }
| $pid = (int)$pid; $plist[] = $pid; }
|
Zeile 2513 | Zeile 2519 |
---|
}
if(empty($posts))
|
}
if(empty($posts))
|
{ error($lang->error_inline_nopostsselected);
| { error($lang->error_inline_nopostsselected);
|
}
$pidin = implode(',', $posts);
| }
$pidin = implode(',', $posts);
|
Zeile 2572 | Zeile 2578 |
---|
// Approve posts - Inline moderation case "multiapproveposts":
|
// Approve posts - Inline moderation case "multiapproveposts":
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); } if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
if(!is_moderator_by_pids($posts, "canapproveunapproveposts")) { error_no_permission(); }
$pids = array(); foreach($posts as $pid) { $pids[] = (int)$pid; }
$moderation->approve_posts($pids);
log_moderator_action($modlogdata, $lang->multi_approve_posts);
| // 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')
|
{ clearinline($mybb->get_input('searchid', 1), 'search'); }
| { $posts = getids($mybb->get_input('searchid'), 'search'); } else { $posts = getids($tid, 'thread'); } if(count($posts) < 1) { error($lang->error_inline_nopostsselected); }
if(!is_moderator_by_pids($posts, "canapproveunapproveposts")) { error_no_permission(); }
$pids = array(); 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') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); }
|
else { clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved); break;
|
else { clearinline($tid, 'thread'); } moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved); 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') { $posts = getids($mybb->get_input('searchid'), 'search');
| if($mybb->get_input('inlinetype') == 'search') { $posts = getids($mybb->get_input('searchid'), 'search');
|
Zeile 2636 | Zeile 2642 |
---|
$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; }
$moderation->unapprove_posts($pids);
| { 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') {
|
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 2693 | Zeile 2699 |
---|
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 2710 |
---|
// 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'));
|
Zeile 2715 | Zeile 2720 |
---|
else { $posts = getids($tid, 'thread');
|
else { $posts = getids($tid, 'thread');
|
}
| }
|
if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
| if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
Zeile 2731 | Zeile 2736 |
---|
{ $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 {
|
Zeile 2810 | Zeile 2815 |
---|
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 2832 |
---|
$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 2845 |
---|
// 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 2874 | Zeile 2880 |
---|
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
| if($tool !== false) { // Verify incoming POST request
|
Zeile 2882 | Zeile 2888 |
---|
$options = my_unserialize($tool['threadoptions']);
|
$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 2899 |
---|
$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'); $url = htmlspecialchars_uni($mybb->get_input('url'));
|
$plugins->run_hooks('moderation_confirmation');
|
$plugins->run_hooks('moderation_confirmation');
|
|
|
eval('$page = "'.$templates->get('moderation_confirmation').'";');
output_page($page); exit; }
|
eval('$page = "'.$templates->get('moderation_confirmation').'";');
output_page($page); exit; }
|
|
|
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"); } if(count($tids) < 1)
|
else { $tids = getids($fid, "forum"); } if(count($tids) < 1)
|
{
| {
|
error($lang->error_inline_nopostsselected);
|
error($lang->error_inline_nopostsselected);
|
}
| }
|
if(!is_moderator_by_tids($tids, "canusecustomtools"))
|
if(!is_moderator_by_tids($tids, "canusecustomtools"))
|
{ error_no_permission(); }
$thread_options = my_unserialize($tool['threadoptions']); if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") {
| { error_no_permission(); }
$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 2952 | Zeile 2962 |
---|
}
$thread_options = my_unserialize($tool['threadoptions']);
|
}
$thread_options = my_unserialize($tool['threadoptions']);
|
if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") {
| if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f") {
|
error($lang->error_movetocategory); }
|
error($lang->error_movetocategory); }
|
$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 3004 | Zeile 3014 |
---|
$tids[] = $row['tid']; }
|
$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 3046 |
---|
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 3085 |
---|
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 3126 |
---|
} 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 3152 |
---|
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 3178 |
---|
* 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 3222 |
---|
* 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 3262 |
---|
/** * 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="") {
|