Zeile 11 | Zeile 11 |
---|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'moderation.php');
|
define("IN_MYBB", 1); define('THIS_SCRIPT', 'moderation.php');
|
$templatelist = 'changeuserbox,loginbox,moderation_delayedmoderation_custommodtool,moderation_delayedmodaction_notes,moderation_delayedmoderation_merge,moderation_delayedmoderation_move'; $templatelist .= ',moderation_delayedmoderation,moderation_deletethread,moderation_deletepoll,moderation_mergeposts_post,moderation_viewthreadnotes,moderation_confirmation'; $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"; $templatelist .= ",moderation_delayedmoderation,moderation_deletethread,moderation_deletepoll,moderation_mergeposts_post,moderation_viewthreadnotes,moderation_confirmation,moderation_purgespammer"; $templatelist .= ",moderation_move,moderation_threadnotes_modaction,moderation_threadnotes_delayedmodaction,moderation_threadnotes,moderation_getip_modoptions,moderation_getip,moderation_getpmip"; $templatelist .= ",moderation_split_post,moderation_inline_deletethreads,moderation_inline_movethreads,moderation_inline_deleteposts,moderation_inline_mergeposts,moderation_threadnotes_modaction_error"; $templatelist .= ",moderation_inline_splitposts,forumjump_special,forumjump_advanced,forumdisplay_password_wrongpass,forumdisplay_password,moderation_inline_moveposts,moderation_delayedmodaction_error"; $templatelist .= ",moderation_delayedmodaction_notes_thread_single,moderation_delayedmodaction_notes_thread_multiple,moderation_delayedmodaction_notes_forum,moderation_delayedmodaction_notes_new_forum"; $templatelist .= ",moderation_delayedmodaction_notes_redirect,moderation_delayedmodaction_notes_merge,moderation_delayedmoderation_thread,moderation_threadnotes_modaction_thread,forumjump_bit"; $templatelist .= ",moderation_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 105 | Zeile 109 |
---|
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 126 | Zeile 148 |
---|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission();
|
}
$plugins->run_hooks('moderation_cancel_delayedmoderation');
| }
$plugins->run_hooks('moderation_cancel_delayedmoderation');
|
$db->delete_query("delayedmoderation", "did='".$mybb->get_input('did', MyBB::INPUT_INT)."'");
| $db->delete_query("delayedmoderation", "did='".$mybb->get_input('did', MyBB::INPUT_INT)."'");
|
Zeile 145 | Zeile 167 |
---|
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', MyBB::INPUT_INT))
|
if(!$mybb->get_input('date_day', MyBB::INPUT_INT))
|
{ $mybb->input['date_day'] = date('d', TIME_NOW); } if(!$mybb->get_input('date_month', MyBB::INPUT_INT)) { $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'])) { $mybb->input['tids'] = $tid;
|
// Assume in-line moderation if TID is not set if(!empty($mybb->input['tid'])) { $mybb->input['tids'] = $tid;
|
}
| }
|
else { if($mybb->get_input('inlinetype') == 'search') { $tids = getids($mybb->get_input('searchid'), 'search');
|
else { if($mybb->get_input('inlinetype') == 'search') { $tids = getids($mybb->get_input('searchid'), 'search');
|
}
| }
|
else { $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
| else { $fid = $mybb->get_input('fid', MyBB::INPUT_INT);
|
Zeile 177 | Zeile 201 |
---|
}
$mybb->input['tids'] = $tids;
|
}
$mybb->input['tids'] = $tids;
|
}
| }
|
add_breadcrumb($lang->delayed_moderation);
| add_breadcrumb($lang->delayed_moderation);
|
Zeile 189 | Zeile 213 |
---|
$errors = array(); $customthreadtools = "";
|
$errors = array(); $customthreadtools = "";
|
$allowed_types = array('openclosethread', 'softdeleterestorethread', 'deletethread', 'move', 'stick', 'merge', 'removeredirects', 'removesubscriptions', 'approveunapprovethread');
| $allowed_types = array('move', 'merge', 'removeredirects', 'removesubscriptions');
|
|
|
$mybb->input['type'] = $mybb->get_input('type');
switch($db->type)
| if(is_moderator($fid, "canopenclosethreads")) { $allowed_types[] = "openclosethread"; }
if(is_moderator($fid, "cansoftdeletethreads") || is_moderator($fid, "canrestorethreads")) { $allowed_types[] = "softdeleterestorethread"; }
if(is_moderator($fid, "candeletethreads")) { $allowed_types[] = "deletethread"; }
if(is_moderator($fid, "canstickunstickthreads")) { $allowed_types[] = "stick"; }
if(is_moderator($fid, "canapproveunapprovethreads"))
|
{
|
{
|
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']);
$checked = ""; if($mybb->input['type'] == "modtool_".$tool['tid']) { $checked = "checked=\"checked\""; }
| |
|
|
eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";");
| $mybb->input['type'] = $mybb->get_input('type');
if(is_moderator($fid, "canusecustomtools")) { switch($db->type) { case "pgsql": case "sqlite": $query = $db->simple_select("modtools", 'tid, name, groups', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'"); break; default: $query = $db->simple_select("modtools", 'tid, name, groups', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'"); } while($tool = $db->fetch_array($query)) { if(is_member($tool['groups'])) { $allowed_types[] = "modtool_".$tool['tid'];
$tool['name'] = htmlspecialchars_uni($tool['name']);
$checked = ""; if($mybb->input['type'] == "modtool_".$tool['tid']) { $checked = "checked=\"checked\""; }
eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";"); } }
|
}
$mybb->input['delayedmoderation'] = $mybb->get_input('delayedmoderation', MyBB::INPUT_ARRAY);
| }
$mybb->input['delayedmoderation'] = $mybb->get_input('delayedmoderation', MyBB::INPUT_ARRAY);
|
Zeile 225 | Zeile 280 |
---|
{ $mybb->input['type'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_type;
|
{ $mybb->input['type'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_type;
|
}
| }
|
if($mybb->input['type'] == 'move' && (!isset($mybb->input['delayedmoderation']['method']) || !in_array($mybb->input['delayedmoderation']['method'], array('move', 'redirect', 'copy')))) { $mybb->input['delayedmoderation']['method'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_method;
|
if($mybb->input['type'] == 'move' && (!isset($mybb->input['delayedmoderation']['method']) || !in_array($mybb->input['delayedmoderation']['method'], array('move', 'redirect', 'copy')))) { $mybb->input['delayedmoderation']['method'] = ''; $errors[] = $lang->error_delayedmoderation_unsupported_method;
|
}
| }
|
if($mybb->input['type'] == 'move') {
| if($mybb->input['type'] == 'move') {
|
Zeile 243 | Zeile 298 |
---|
}
if($mybb->input['date_day'] > 31 || $mybb->input['date_day'] < 1)
|
}
if($mybb->input['date_day'] > 31 || $mybb->input['date_day'] < 1)
|
{
| {
|
$errors[] = $lang->error_delayedmoderation_invalid_date_day; }
| $errors[] = $lang->error_delayedmoderation_invalid_date_day; }
|
Zeile 252 | Zeile 307 |
---|
$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(' ', $mybb->get_input('date_time')); $date_time = explode(':', (string)$date_time[0]);
if(stristr($mybb->input['date_time'], 'pm'))
|
$date_time = explode(' ', $mybb->get_input('date_time')); $date_time = explode(':', (string)$date_time[0]);
if(stristr($mybb->input['date_time'], 'pm'))
|
{
| {
|
$date_time[0] = 12+$date_time[0]; if($date_time[0] >= 24) {
| $date_time[0] = 12+$date_time[0]; if($date_time[0] >= 24) {
|
Zeile 269 | Zeile 324 |
---|
} }
|
} }
|
$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));
| $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']);
|
}
$did = $db->insert_query("delayedmoderation", array(
| }
$did = $db->insert_query("delayedmoderation", array(
|
Zeile 287 | Zeile 342 |
---|
'dateline' => TIME_NOW, 'inputs' => $db->escape_string(my_serialize($mybb->input['delayedmoderation'])) ));
|
'dateline' => TIME_NOW, 'inputs' => $db->escape_string(my_serialize($mybb->input['delayedmoderation'])) ));
|
|
|
$plugins->run_hooks('moderation_do_delayedmoderation');
$rundate_format = my_date('relative', $rundate, '', 2);
| $plugins->run_hooks('moderation_do_delayedmoderation');
$rundate_format = my_date('relative', $rundate, '', 2);
|
Zeile 304 | Zeile 359 |
---|
moderation_redirect(get_forum_link($fid), $lang->sprintf($lang->redirect_delayed_moderation_search, $rundate_format)); } else
|
moderation_redirect(get_forum_link($fid), $lang->sprintf($lang->redirect_delayed_moderation_search, $rundate_format)); } else
|
{
| {
|
moderation_redirect(get_forum_link($fid), $lang->sprintf($lang->redirect_delayed_moderation_forum, $rundate_format)); } } } else
|
moderation_redirect(get_forum_link($fid), $lang->sprintf($lang->redirect_delayed_moderation_forum, $rundate_format)); } } } else
|
{
| {
|
$type_selected = array(); foreach($allowed_types as $type) {
| $type_selected = array(); foreach($allowed_types as $type) {
|
Zeile 321 | Zeile 376 |
---|
if(isset($mybb->input['delayedmoderation']['method'])) { $method_selected[$mybb->input['delayedmoderation']['method']] = "checked=\"checked\"";
|
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 334 | Zeile 389 |
---|
$mybb->input['delayedmoderation']['new_forum'] = (int)$mybb->input['delayedmoderation']['new_forum']; $mybb->input['delayedmoderation']['subject'] = htmlspecialchars_uni($mybb->input['delayedmoderation']['subject']); $mybb->input['delayedmoderation']['threadurl'] = htmlspecialchars_uni($mybb->input['delayedmoderation']['threadurl']);
|
$mybb->input['delayedmoderation']['new_forum'] = (int)$mybb->input['delayedmoderation']['new_forum']; $mybb->input['delayedmoderation']['subject'] = htmlspecialchars_uni($mybb->input['delayedmoderation']['subject']); $mybb->input['delayedmoderation']['threadurl'] = htmlspecialchars_uni($mybb->input['delayedmoderation']['threadurl']);
|
|
|
$forumselect = build_forum_jump("", $mybb->input['delayedmoderation']['new_forum'], 1, '', 0, true, '', "delayedmoderation[new_forum]"); } }
| $forumselect = build_forum_jump("", $mybb->input['delayedmoderation']['new_forum'], 1, '', 0, true, '', "delayedmoderation[new_forum]"); } }
|
Zeile 351 | Zeile 406 |
---|
$mybb->input['delayedmoderation']['redirect_expire'] = ''; $mybb->input['delayedmoderation']['subject'] = $thread['subject']; $mybb->input['delayedmoderation']['threadurl'] = '';
|
$mybb->input['delayedmoderation']['redirect_expire'] = ''; $mybb->input['delayedmoderation']['subject'] = $thread['subject']; $mybb->input['delayedmoderation']['threadurl'] = '';
|
|
|
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "delayedmoderation[new_forum]"); }
| $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "delayedmoderation[new_forum]"); }
|
Zeile 362 | Zeile 417 |
---|
else { $display_errors = '';
|
else { $display_errors = '';
|
}
| }
|
$forum_cache = $cache->read("forums");
$actions = array(
| $forum_cache = $cache->read("forums");
$actions = array(
|
Zeile 398 | Zeile 453 |
---|
{ // Inline thread moderation is used if($mybb->get_input('inlinetype') == 'search')
|
{ // Inline thread moderation is used if($mybb->get_input('inlinetype') == 'search')
|
{
| {
|
$tids = getids($mybb->get_input('searchid'), 'search'); } else { $tids = getids($fid, "forum");
|
$tids = getids($mybb->get_input('searchid'), 'search'); } else { $tids = getids($fid, "forum");
|
}
| }
|
$where_array = array();
|
$where_array = array();
|
switch($db->type) { case "pgsql": case "sqlite": foreach($tids as $like)
| switch($db->type) { case "pgsql": case "sqlite": foreach($tids as $like)
|
{ $where_array[] = "','||d.tids||',' LIKE '%,".$db->escape_string($like).",%'"; }
| { $where_array[] = "','||d.tids||',' LIKE '%,".$db->escape_string($like).",%'"; }
|
Zeile 445 | Zeile 500 |
---|
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
| ORDER BY d.dateline DESC
|
LIMIT 0, 20 "); break;
| LIMIT 0, 20 "); break;
|
Zeile 461 | Zeile 516 |
---|
"); } }
|
"); } }
|
|
|
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) { $delayed_thread = get_thread($delayedmod['tids']);
|
$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']);
|
$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 />"; }
| $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') {
|
} 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")."\";");
| }
eval("\$delayedmods .= \"".$templates->get("moderation_delayedmodaction_notes")."\";");
|
Zeile 518 | Zeile 584 |
---|
if($mybb->get_input('tid', MyBB::INPUT_INT)) { $lang->threads = $lang->thread;
|
if($mybb->get_input('tid', MyBB::INPUT_INT)) { $lang->threads = $lang->thread;
|
$threads = "<a href=\"".get_thread_link($tid)."\">{$thread['subject']}</a>";
| $thread['link'] = get_thread_link($tid); 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 568 | Zeile 635 |
---|
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);
$openclosethread = ''; if(is_moderator($fid, "canopenclosethreads")) { eval('$openclosethread = "'.$templates->get('moderation_delayedmoderation_openclose').'";'); }
$softdeleterestorethread = ''; if(is_moderator($fid, "cansoftdeletethreads") || is_moderator($fid, "canrestorethreads")) { eval('$softdeleterestorethread = "'.$templates->get('moderation_delayedmoderation_softdeleterestore').'";'); }
$deletethread = ''; if(is_moderator($fid, "candeletethreads")) { eval('$deletethread = "'.$templates->get('moderation_delayedmoderation_delete').'";'); }
$stickunstickthread = ''; if(is_moderator($fid, "canstickunstickthreads")) { eval('$stickunstickthread = "'.$templates->get('moderation_delayedmoderation_stick').'";'); }
$approveunapprovethread = ''; if(is_moderator($fid, "canapproveunapprovethreads")) { eval('$approveunapprovethread = "'.$templates->get('moderation_delayedmoderation_approve').'";'); }
|
$plugins->run_hooks("moderation_delayedmoderation");
| $plugins->run_hooks("moderation_delayedmoderation");
|
Zeile 584 | Zeile 681 |
---|
if(!is_moderator($fid, "canopenclosethreads")) { error_no_permission();
|
if(!is_moderator($fid, "canopenclosethreads")) { error_no_permission();
|
}
| }
|
if($thread['closed'] == 1)
|
if($thread['closed'] == 1)
|
{
| {
|
$openclose = $lang->opened; $redirect = $lang->redirect_openthread; $moderation->open_threads($tid);
| $openclose = $lang->opened; $redirect = $lang->redirect_openthread; $moderation->open_threads($tid);
|
Zeile 597 | Zeile 694 |
---|
$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 623 | Zeile 720 |
---|
$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 731 |
---|
$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 767 |
---|
} }
|
} }
|
$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 708 | Zeile 805 |
---|
// Delete the poll from a thread confirmation page case "deletepoll": add_breadcrumb($lang->nav_deletepoll);
|
// Delete the poll from a thread confirmation page case "deletepoll": add_breadcrumb($lang->nav_deletepoll);
|
|
|
if(!is_moderator($fid, "canmanagepolls")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
| if(!is_moderator($fid, "canmanagepolls")) { if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
|
Zeile 732 | Zeile 829 |
---|
// Delete the actual poll here! case "do_deletepoll":
|
// Delete the actual poll here! case "do_deletepoll":
|
|
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!isset($mybb->input['delete']))
|
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if(!isset($mybb->input['delete']))
|
{
| {
|
error($lang->redirect_pollnotdeleted); } if(!is_moderator($fid, "canmanagepolls"))
| error($lang->redirect_pollnotdeleted); } if(!is_moderator($fid, "canmanagepolls"))
|
Zeile 752 | Zeile 849 |
---|
if(!$poll) { error($lang->error_invalidpoll);
|
if(!$poll) { error($lang->error_invalidpoll);
|
}
$plugins->run_hooks("moderation_do_deletepoll");
| }
$plugins->run_hooks("moderation_do_deletepoll");
|
$lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->poll_deleted);
| $lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']); log_moderator_action($modlogdata, $lang->poll_deleted);
|
Zeile 784 | Zeile 881 |
---|
$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_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
| $moderation->unapprove_threads($tid);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
|
Zeile 826 | Zeile 923 |
---|
log_moderator_action($modlogdata, $lang->thread_restored);
$moderation->restore_threads($tid);
|
log_moderator_action($modlogdata, $lang->thread_restored);
$moderation->restore_threads($tid);
|
|
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored); break;
// Soft delete a thread
|
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 965 |
---|
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', MyBB::INPUT_INT); $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
| error_no_permission(); } // Check if user has moderator permission to move to destination
|
Zeile 954 | Zeile 1051 |
---|
// 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"))
| if(!is_moderator($fid, "canmanagethreads"))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
Zeile 978 | Zeile 1075 |
---|
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")."\";");
| }
eval("\$modactions .= \"".$templates->get("moderation_threadnotes_modaction")."\";");
|
Zeile 1041 | Zeile 1146 |
---|
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:
| "); break; default:
|
Zeile 1060 | Zeile 1165 |
---|
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 />"; } else { $info .= "<strong>{$lang->thread}</strong> {$lang->multiple_threads}<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 { 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 1099 | Zeile 1222 |
---|
{ $cols = 4; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";");
|
{ $cols = 4; eval("\$delayedmods = \"".$templates->get("moderation_delayedmodaction_error")."\";");
|
}
| }
|
$plugins->run_hooks("moderation_threadnotes");
eval("\$threadnotes = \"".$templates->get("moderation_threadnotes")."\";"); output_page($threadnotes);
|
$plugins->run_hooks("moderation_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 1126 | Zeile 1249 |
---|
); $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":
| // Let's look up the ip address of a post case "getip":
|
Zeile 1143 | Zeile 1266 |
---|
$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 1213 | Zeile 1337 |
---|
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 1334 | Zeile 1458 |
---|
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 1352 | Zeile 1477 |
---|
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 1404 | Zeile 1531 |
---|
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') { error($lang->error_invalidforum);
|
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '') { error($lang->error_invalidforum);
|
}
| }
|
$pids = array();
| $pids = array();
|
Zeile 1422 | Zeile 1549 |
---|
$newtid = $moderation->split_posts($pids, $tid, $moveto, $mybb->get_input('newsubject'));
log_moderator_action($modlogdata, $lang->thread_split);
|
$newtid = $moderation->split_posts($pids, $tid, $moveto, $mybb->get_input('newsubject'));
log_moderator_action($modlogdata, $lang->thread_split);
|
|
|
moderation_redirect(get_thread_link($newtid), $lang->redirect_threadsplit); break;
|
moderation_redirect(get_thread_link($newtid), $lang->redirect_threadsplit); 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")) { error_no_permission(); }
$plugins->run_hooks("moderation_removesubscriptions");
|
if(!is_moderator($fid, "canmanagethreads")) { error_no_permission(); }
$plugins->run_hooks("moderation_removesubscriptions");
|
|
|
$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);
|
Zeile 1451 | Zeile 1582 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'candeletethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'candeletethreads'))
|
{
| {
|
error_no_permission(); } }
| error_no_permission(); } }
|
Zeile 1481 | Zeile 1612 |
---|
eval("\$multidelete = \"".$templates->get("moderation_inline_deletethreads")."\";"); output_page($multidelete); break;
|
eval("\$multidelete = \"".$templates->get("moderation_inline_deletethreads")."\";"); output_page($multidelete); break;
|
|
|
// Actually delete the threads - Inline moderation case "do_multideletethreads":
| // Actually delete the threads - Inline moderation case "do_multideletethreads":
|
Zeile 1498 | Zeile 1629 |
---|
$tid = (int)$tid; $moderation->delete_thread($tid); $tlist[] = $tid;
|
$tid = (int)$tid; $moderation->delete_thread($tid); $tlist[] = $tid;
|
}
| }
|
log_moderator_action($modlogdata, $lang->multi_deleted_threads); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
log_moderator_action($modlogdata, $lang->multi_deleted_threads); if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
|
}
| }
|
else { clearinline($fid, 'forum');
| else { clearinline($fid, 'forum');
|
Zeile 1523 | Zeile 1654 |
---|
// 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 1544 | Zeile 1675 |
---|
$moderation->open_threads($threads);
log_moderator_action($modlogdata, $lang->multi_opened_threads);
|
$moderation->open_threads($threads);
log_moderator_action($modlogdata, $lang->multi_opened_threads);
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else {
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else {
|
clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsopened); break;
|
clearinline($fid, 'forum'); } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsopened); break;
|
|
|
// Close threads - Inline moderation case "multiclosethreads":
| // Close threads - Inline moderation case "multiclosethreads":
|
Zeile 1566 | Zeile 1697 |
---|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
|
{ error_no_permission(); } } else
| { error_no_permission(); } } else
|
{ $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads'))
| { $threads = getids($fid, 'forum'); if(!is_moderator($fid, 'canopenclosethreads'))
|
Zeile 1586 | Zeile 1717 |
---|
$moderation->close_threads($threads);
log_moderator_action($modlogdata, $lang->multi_closed_threads);
|
$moderation->close_threads($threads);
log_moderator_action($modlogdata, $lang->multi_closed_threads);
|
if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($fid, 'forum');
| if($mybb->get_input('inlinetype') == 'search') { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($fid, 'forum');
|
} moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsclosed); break;
| } moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsclosed); break;
|
Zeile 1604 | Zeile 1735 |
---|
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, 'canapproveunapprovethreads'))
|
// From search page $threads = getids($mybb->get_input('searchid'), 'search'); if(!is_moderator_by_tids($threads, 'canapproveunapprovethreads'))
|
{ error_no_permission(); }
| { error_no_permission(); }
|
} else {
| } else {
|
Zeile 1621 | Zeile 1752 |
---|
} } if(count($threads) < 1)
|
} } if(count($threads) < 1)
|
{
| {
|
error($lang->error_inline_nothreadsselected); }
| error($lang->error_inline_nothreadsselected); }
|
Zeile 1638 | Zeile 1769 |
---|
} $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved);
|
} $cache->update_stats(); moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved);
|
break;
| break;
|
// Unapprove threads - Inline moderation case "multiunapprovethreads":
| // Unapprove threads - Inline moderation case "multiunapprovethreads":
|
Zeile 2363 | Zeile 2494 |
---|
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 FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid)
| $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) GROUP BY p.tid, p.pid "); $pcheck2 = array(); while($tcheck = $db->fetch_array($query))
|
WHERE p.pid IN ($pidin) AND q.pid NOT IN ($pidin) GROUP BY p.tid, p.pid "); $pcheck2 = array(); while($tcheck = $db->fetch_array($query))
|
{
| {
|
if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid'];
| if($tcheck['count'] > 0) { $pcheck2[] = $tcheck['tid'];
|
Zeile 2413 | Zeile 2544 |
---|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else
|
{
| {
|
clearinline($tid, 'thread'); } $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
| clearinline($tid, 'thread'); } $forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");
|
Zeile 2426 | Zeile 2557 |
---|
// 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 2436 | Zeile 2569 |
---|
{ // Get thread to merge's tid the SEO way preg_match("#thread-([0-9]+)?#i", $mybb->input['threadurl'], $threadmatch);
|
{ // 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);
| preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);
|
if($threadmatch[1]) {
| if($threadmatch[1]) {
|
Zeile 2527 | Zeile 2660 |
---|
// 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(" 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)
| $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 ");
| WHERE p.pid IN ($pidin) GROUP BY p.tid, p.pid ");
|
Zeile 2621 | Zeile 2754 |
---|
break;
// Unapprove posts - Inline moderation
|
break;
// Unapprove posts - Inline moderation
|
case "multiunapproveposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') {
| case "multiunapproveposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') {
|
$posts = getids($mybb->get_input('searchid'), 'search');
|
$posts = getids($mybb->get_input('searchid'), 'search');
|
} else {
| } else {
|
$posts = getids($tid, 'thread'); }
| $posts = getids($tid, 'thread'); }
|
Zeile 2642 | Zeile 2775 |
---|
$pids = array();
if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))
|
$pids = array();
if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
| }
|
foreach($posts as $pid) { $pids[] = (int)$pid;
|
foreach($posts as $pid) { $pids[] = (int)$pid;
|
}
| }
|
$moderation->unapprove_posts($pids);
log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
|
$moderation->unapprove_posts($pids);
log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
|
if($mybb->get_input('inlinetype') == 'search')
| if($mybb->get_input('inlinetype') == 'search')
|
{ clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); }
| { clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); }
|
Zeile 2665 | Zeile 2798 |
---|
break;
// Restore posts - Inline moderation
|
break;
// Restore posts - Inline moderation
|
case "multirestoreposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') {
| case "multirestoreposts":
// Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('inlinetype') == 'search') {
|
$posts = getids($mybb->get_input('searchid'), 'search'); } else
| $posts = getids($mybb->get_input('searchid'), 'search'); } else
|
Zeile 2681 | Zeile 2814 |
---|
if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
if(count($posts) < 1) { error($lang->error_inline_nopostsselected);
|
}
| }
|
if(!is_moderator_by_pids($posts, "canrestoreposts")) { error_no_permission();
|
if(!is_moderator_by_pids($posts, "canrestoreposts")) { error_no_permission();
|
}
| }
|
$pids = array(); foreach($posts as $pid)
| $pids = array(); foreach($posts as $pid)
|
Zeile 2710 | Zeile 2843 |
---|
// 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 2739 | Zeile 2871 |
---|
}
$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', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread');
|
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search'); } else { clearinline($tid, 'thread');
|
}
| }
|
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postssoftdeleted); break; case "do_purgespammer":
| moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postssoftdeleted); break; case "do_purgespammer":
|
Zeile 2756 | Zeile 2888 |
---|
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']; $user = get_user($uid); if(!$user['uid'] || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid'])) { error($lang->purgespammer_invalid_user);
|
$uid = $mybb->input['uid']; $user = get_user($uid); if(!$user['uid'] || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid'])) { error($lang->purgespammer_invalid_user);
|
}
| }
|
if($mybb->input['action'] == "do_purgespammer") {
| if($mybb->input['action'] == "do_purgespammer") {
|
Zeile 2865 | Zeile 2997 |
---|
$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") { $lang->purgespammer_purge_desc = $lang->sprintf($lang->purgespammer_purge_desc, $lang->purgespammer_ban);
| if($mybb->settings['purgespammerbandelete'] == "ban") { $lang->purgespammer_purge_desc = $lang->sprintf($lang->purgespammer_purge_desc, $lang->purgespammer_ban);
|
Zeile 3001 | Zeile 3133 |
---|
if(!is_moderator_by_pids($pids, "canusecustomtools")) { error_no_permission();
|
if(!is_moderator_by_pids($pids, "canusecustomtools")) { error_no_permission();
|
}
| }
|
// Get threads which are associated with the posts $tids = array(); $options = array( 'order_by' => 'dateline', 'order_dir' => 'asc' );
|
// Get threads which are associated with the posts $tids = array(); $options = array( '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'];
|
Zeile 3039 | Zeile 3171 |
---|
moderation_redirect(get_thread_link($tid), $lang->redirect_customtool_thread); } }
|
moderation_redirect(get_thread_link($tid), $lang->redirect_customtool_thread); } }
|
|
|
break; } }
| break; } }
|
Zeile 3047 | Zeile 3179 |
---|
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;
|
|
|
$newids = array(); $cookie = "inlinemod_".$type.$id; if(isset($mybb->cookies[$cookie]))
| $newids = array(); $cookie = "inlinemod_".$type.$id; if(isset($mybb->cookies[$cookie]))
|
Zeile 3068 | Zeile 3207 |
---|
if($cookie_id == 'ALL') { $newids += getallids($id, $type);
|
if($cookie_id == 'ALL') { $newids += getallids($id, $type);
|
}
| }
|
else { $newids[] = (int)$cookie_id; } } }
|
else { $newids[] = (int)$cookie_id; } } }
|
|
|
return $newids; }
|
return $newids; }
|
| /** * @param int $id * @param string $type * * @return array */
|
function getallids($id, $type) { global $db, $mybb;
| function getallids($id, $type) { global $db, $mybb;
|
Zeile 3140 | Zeile 3285 |
---|
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 3158 | Zeile 3311 |
---|
* 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 3202 | Zeile 3355 |
---|
* 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 3242 | Zeile 3395 |
---|
/** * 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="") {
|