Vergleich moderation.php - 1.8.6 - 1.8.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 11Zeile 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";


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 105Zeile 108
	check_forum_password($forum['fid']);
}


	check_forum_password($forum['fid']);
}


 
$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']);

eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");

$allowable_moderation_actions = array("getip", "getpmip", "cancel_delayedmoderation", "delayedmoderation", "threadnotes", "purgespammer", "viewthreadnotes");

eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");

$allowable_moderation_actions = array("getip", "getpmip", "cancel_delayedmoderation", "delayedmoderation", "threadnotes", "purgespammer", "viewthreadnotes");

Zeile 145Zeile 149
	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);

			$mybb->input['date_day'] = gmdate('d', TIME_NOW + $localized_time_offset);

		}
if(!$mybb->get_input('date_month', MyBB::INPUT_INT))
{

		}
if(!$mybb->get_input('date_month', MyBB::INPUT_INT))
{

			$mybb->input['date_month'] = date('m', TIME_NOW);

			$mybb->input['date_month'] = gmdate('m', TIME_NOW + $localized_time_offset);

		}

// Assume in-line moderation if TID is not set

		}

// Assume in-line moderation if TID is not set

Zeile 252Zeile 258
				$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;
}

Zeile 269Zeile 275
				}
}


				}
}


			$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(!$errors)
{

Zeile 369Zeile 375
		$actions = array(
'openclosethread' => $lang->open_close_thread,
'softdeleterestorethread' => $lang->softdelete_restore_thread,

		$actions = array(
'openclosethread' => $lang->open_close_thread,
'softdeleterestorethread' => $lang->softdelete_restore_thread,

			'deletethread' => $lang->delete_thread,
'move' => $lang->move_copy_thread,
'stick' => $lang->stick_unstick_thread,
'merge' => $lang->merge_threads,
'removeredirects' => $lang->remove_redirects,
'removesubscriptions' => $lang->remove_subscriptions,
'approveunapprovethread' => $lang->approve_unapprove_thread
);

switch($db->type)

			'deletethread' => $lang->delete_thread,
'move' => $lang->move_copy_thread,
'stick' => $lang->stick_unstick_thread,
'merge' => $lang->merge_threads,
'removeredirects' => $lang->remove_redirects,
'removesubscriptions' => $lang->remove_subscriptions,
'approveunapprovethread' => $lang->approve_unapprove_thread
);

switch($db->type)

		{
case "pgsql":
case "sqlite":

		{
case "pgsql":
case "sqlite":

Zeile 406Zeile 412
				$tids = getids($fid, "forum");
}
$where_array = array();

				$tids = getids($fid, "forum");
}
$where_array = array();

			switch($db->type)

			switch($db->type)

			{
case "pgsql":
case "sqlite":

			{
case "pgsql":
case "sqlite":

Zeile 432Zeile 438
				ORDER BY d.dateline DESC
LIMIT 0, 20
");

				ORDER BY d.dateline DESC
LIMIT 0, 20
");

		}

		}

		else
{
switch($db->type)

		else
{
switch($db->type)

Zeile 461Zeile 467
					");
}
}

					");
}
}

 
		

		while($delayedmod = $db->fetch_array($query))
{

		while($delayedmod = $db->fetch_array($query))
{

			$delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);


			$delayedmod['dateline'] = my_date("jS M Y, {$mybb->settings['timeformat']}", $delayedmod['delaydateline']);
$delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']);

			$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']);
$delayedmod['action'] = $actions[$delayedmod['type']];
$info = '';
if(strpos($delayedmod['tids'], ',') === false)

			$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']);
$delayedmod['action'] = $actions[$delayedmod['type']];
$info = '';
if(strpos($delayedmod['tids'], ',') === false)

			{

			{

				$delayed_thread = get_thread($delayedmod['tids']);

				$delayed_thread = get_thread($delayedmod['tids']);

				$info .= "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($delayedmod['tids'])."\">".htmlspecialchars_uni($delayed_thread['subject'])."</a><br />";
}
else
{
$info .= "<strong>{$lang->thread}</strong> {$lang->multiple_threads}<br />";
}

if($delayedmod['fname'])
{
$info .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($delayedmod['fid'])."\">".htmlspecialchars_uni($delayedmod['fname'])."</a><br />";
}
$delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);

if($delayedmod['type'] == 'move')
{
$info .= "<strong>{$lang->new_forum}</strong> <a href=\"".get_forum_link($delayedmod['inputs']['new_forum'])."\">".htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name'])."</a><br />";
if($delayedmod['inputs']['method'] == "redirect")
{
if((int)$delayedmod['inputs']['redirect_expire'] == 0)
{
$redirect_expire_bit = $lang->redirect_forever;
}
else
{
$redirect_expire_bit = (int)$delayedmod['inputs']['redirect_expire']." {$lang->days}";
}
$info .= "<strong>{$lang->leave_redirect_for}</strong> {$redirect_expire_bit}<br />";
}









				$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 518Zeile 535
		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 568Zeile 586

eval('$datemonth = "'.$templates->get('moderation_delayedmoderation_date_month').'";');



eval('$datemonth = "'.$templates->get('moderation_delayedmoderation_date_month').'";');


		$dateyear = gmdate('Y', TIME_NOW);
$datetime = gmdate('g:i a', TIME_NOW);

		$dateyear = gmdate('Y', TIME_NOW  + $localized_time_offset);
$datetime = gmdate($mybb->settings['timeformat'], TIME_NOW + $localized_time_offset);


$plugins->run_hooks("moderation_delayedmoderation");

eval("\$delayedmoderation = \"".$templates->get("moderation_delayedmoderation")."\";");
output_page($delayedmoderation);


$plugins->run_hooks("moderation_delayedmoderation");

eval("\$delayedmoderation = \"".$templates->get("moderation_delayedmoderation")."\";");
output_page($delayedmoderation);

		break;

		break;

	// Open or close a thread
case "openclosethread":
// Verify incoming POST request

	// Open or close a thread
case "openclosethread":
// Verify incoming POST request

Zeile 613Zeile 631

if(!is_moderator($fid, "canstickunstickthreads"))
{


if(!is_moderator($fid, "canstickunstickthreads"))
{

			error_no_permission();
}

$plugins->run_hooks("moderation_stick");

if($thread['sticky'] == 1)
{

			error_no_permission();
}

$plugins->run_hooks("moderation_stick");

if($thread['sticky'] == 1)
{

			$stuckunstuck = $lang->unstuck;
$redirect = $lang->redirect_unstickthread;
$moderation->unstick_threads($tid);

			$stuckunstuck = $lang->unstuck;
$redirect = $lang->redirect_unstickthread;
$moderation->unstick_threads($tid);

Zeile 629Zeile 647
			$stuckunstuck = $lang->stuck;
$redirect = $lang->redirect_stickthread;
$moderation->stick_threads($tid);

			$stuckunstuck = $lang->stuck;
$redirect = $lang->redirect_stickthread;
$moderation->stick_threads($tid);

		}

$lang->mod_process = $lang->sprintf($lang->mod_process, $stuckunstuck);


		}

$lang->mod_process = $lang->sprintf($lang->mod_process, $stuckunstuck);


		log_moderator_action($modlogdata, $lang->mod_process);

moderation_redirect(get_thread_link($thread['tid']), $redirect);

		log_moderator_action($modlogdata, $lang->mod_process);

moderation_redirect(get_thread_link($thread['tid']), $redirect);

Zeile 661Zeile 679
	case "deletethread":

add_breadcrumb($lang->nav_deletethread);

	case "deletethread":

add_breadcrumb($lang->nav_deletethread);





		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 669Zeile 687
				error_no_permission();
}
}

				error_no_permission();
}
}





		$plugins->run_hooks("moderation_deletethread");

eval("\$deletethread = \"".$templates->get("moderation_deletethread")."\";");
output_page($deletethread);

		$plugins->run_hooks("moderation_deletethread");

eval("\$deletethread = \"".$templates->get("moderation_deletethread")."\";");
output_page($deletethread);

		break;


		break;


	// Delete the actual thread here
case "do_deletethread":

	// Delete the actual thread here
case "do_deletethread":





		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));





		if(!is_moderator($fid, "candeletethreads"))

		if(!is_moderator($fid, "candeletethreads"))

		{
if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
{
error_no_permission();
}
}

$plugins->run_hooks("moderation_do_deletethread");

		{
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 703Zeile 721

mark_reports($tid, "thread");
moderation_redirect(get_forum_link($fid), $lang->redirect_threaddeleted);


mark_reports($tid, "thread");
moderation_redirect(get_forum_link($fid), $lang->redirect_threaddeleted);

		break;


		break;


	// 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'])
{
error_no_permission();
}

		if(!is_moderator($fid, "canmanagepolls"))
{
if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
{
error_no_permission();
}

		}

$plugins->run_hooks("moderation_deletepoll");


		}

$plugins->run_hooks("moderation_deletepoll");


		$query = $db->simple_select("polls", "pid", "tid='$tid'");
$poll = $db->fetch_array($query);
if(!$poll)
{
error($lang->error_invalidpoll);
}

		$query = $db->simple_select("polls", "pid", "tid='$tid'");
$poll = $db->fetch_array($query);
if(!$poll)
{
error($lang->error_invalidpoll);
}





		eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";");
output_page($deletepoll);
break;

// Delete the actual poll here!
case "do_deletepoll":

		eval("\$deletepoll = \"".$templates->get("moderation_deletepoll")."\";");
output_page($deletepoll);
break;

// Delete the actual poll here!
case "do_deletepoll":





		// 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 767Zeile 785
	// Approve a thread
case "approvethread":


	// Approve a thread
case "approvethread":


		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

if(!is_moderator($fid, "canapproveunapprovethreads"))
{
error_no_permission();
}
$thread = get_thread($tid);

$plugins->run_hooks("moderation_approvethread");


		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

if(!is_moderator($fid, "canapproveunapprovethreads"))
{
error_no_permission();
}
$thread = get_thread($tid);

$plugins->run_hooks("moderation_approvethread");


		$lang->thread_approved = $lang->sprintf($lang->thread_approved, $thread['subject']);
log_moderator_action($modlogdata, $lang->thread_approved);

$moderation->approve_threads($tid, $fid);

		$lang->thread_approved = $lang->sprintf($lang->thread_approved, $thread['subject']);
log_moderator_action($modlogdata, $lang->thread_approved);

$moderation->approve_threads($tid, $fid);





		moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadapproved);
break;

// Unapprove a thread

		moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadapproved);
break;

// Unapprove a thread

	case "unapprovethread":

// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

	case "unapprovethread":

// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


if(!is_moderator($fid, "canapproveunapprovethreads"))
{
error_no_permission();
}
$thread = get_thread($tid);


if(!is_moderator($fid, "canapproveunapprovethreads"))
{
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;

// Restore a thread
case "restorethread":

		moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
break;

// Restore a thread
case "restorethread":





		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

if(!is_moderator($fid, "canrestorethreads"))

		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

if(!is_moderator($fid, "canrestorethreads"))

		{
error_no_permission();
}
$thread = get_thread($tid);

		{
error_no_permission();
}
$thread = get_thread($tid);


$plugins->run_hooks("moderation_restorethread");

$lang->thread_restored = $lang->sprintf($lang->thread_restored, $thread['subject']);
log_moderator_action($modlogdata, $lang->thread_restored);


$plugins->run_hooks("moderation_restorethread");

$lang->thread_restored = $lang->sprintf($lang->thread_restored, $thread['subject']);
log_moderator_action($modlogdata, $lang->thread_restored);





		$moderation->restore_threads($tid);

moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored);
break;

// Soft delete a thread

		$moderation->restore_threads($tid);

moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored);
break;

// Soft delete a thread

	case "softdeletethread":


	case "softdeletethread":


		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


Zeile 841Zeile 859
			error_no_permission();
}
$thread = get_thread($tid);

			error_no_permission();
}
$thread = get_thread($tid);





		$plugins->run_hooks("moderation_softdeletethread");

$lang->thread_soft_deleted = $lang->sprintf($lang->thread_soft_deleted, $thread['subject']);
log_moderator_action($modlogdata, $lang->thread_soft_deleted);

		$plugins->run_hooks("moderation_softdeletethread");

$lang->thread_soft_deleted = $lang->sprintf($lang->thread_soft_deleted, $thread['subject']);
log_moderator_action($modlogdata, $lang->thread_soft_deleted);





		$moderation->soft_delete_threads($tid);

moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadsoftdeleted);

		$moderation->soft_delete_threads($tid);

moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadsoftdeleted);

Zeile 978Zeile 996
			while($modaction = $db->fetch_array($query))
{
$modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);

			while($modaction = $db->fetch_array($query))
{
$modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);

 
				$modaction['username'] = htmlspecialchars_uni($modaction['username']);

				$modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']);
$modaction['action'] = htmlspecialchars_uni($modaction['action']);
$info = '';
if($modaction['tsubject'])
{

				$modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']);
$modaction['action'] = htmlspecialchars_uni($modaction['action']);
$info = '';
if($modaction['tsubject'])
{

					$info .= "<strong>$lang->thread</strong> <a href=\"".get_thread_link($modaction['tid'])."\">".htmlspecialchars_uni($modaction['tsubject'])."</a><br />";



					$modaction['tsubject'] = htmlspecialchars_uni($parser->parse_badwords($modaction['tsubject']));
$modaction['threadlink'] = get_thread_link($modaction['tid']);
eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_thread")."\";");

				}
if($modaction['fname'])
{

				}
if($modaction['fname'])
{

					$info .= "<strong>$lang->forum</strong> <a href=\"".get_forum_link($modaction['fid'])."\">".htmlspecialchars_uni($modaction['fname'])."</a><br />";



					$modaction['fname'] = htmlspecialchars_uni($modaction['fname']);
$modaction['forumlink'] = get_forum_link($modaction['fid']);
eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_forum")."\";");

				}
if($modaction['psubject'])
{

				}
if($modaction['psubject'])
{

					$info .= "<strong>$lang->post</strong> <a href=\"".get_post_link($modaction['pid'])."#pid".$modaction['pid']."\">".htmlspecialchars_uni($modaction['psubject'])."</a>";





$modaction['psubject'] = htmlspecialchars_uni($parser->parse_badwords($modaction['psubject']));
$modaction['postlink'] = get_post_link($modaction['pid']);
eval("\$info .= \"".$templates->get("moderation_threadnotes_modaction_post")."\";");

				}

				}





				eval("\$modactions .= \"".$templates->get("moderation_threadnotes_modaction")."\";");
$trow = alt_trow();

				eval("\$modactions .= \"".$templates->get("moderation_threadnotes_modaction")."\";");
$trow = alt_trow();

			}

			}

			if(!$modactions)
{
eval("\$modactions = \"".$templates->get("moderation_threadnotes_modaction_error")."\";");

			if(!$modactions)
{
eval("\$modactions = \"".$templates->get("moderation_threadnotes_modaction_error")."\";");

			}
}


			}
}


		$actions = array(
'openclosethread' => $lang->open_close_thread,
'deletethread' => $lang->delete_thread,

		$actions = array(
'openclosethread' => $lang->open_close_thread,
'deletethread' => $lang->delete_thread,

Zeile 1013Zeile 1039
			'removesubscriptions' => $lang->remove_subscriptions,
'approveunapprovethread' => $lang->approve_unapprove_thread
);

			'removesubscriptions' => $lang->remove_subscriptions,
'approveunapprovethread' => $lang->approve_unapprove_thread
);





		switch($db->type)
{
case "pgsql":

		switch($db->type)
{
case "pgsql":

Zeile 1024Zeile 1050
				$query = $db->simple_select("modtools", 'tid, name', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'");
}
while($tool = $db->fetch_array($query))

				$query = $db->simple_select("modtools", 'tid, name', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'");
}
while($tool = $db->fetch_array($query))

		{

		{

			$actions['modtool_'.$tool['tid']] = htmlspecialchars_uni($tool['name']);
}

			$actions['modtool_'.$tool['tid']] = htmlspecialchars_uni($tool['name']);
}





		$forum_cache = $cache->read("forums");

$trow = alt_trow(1);

		$forum_cache = $cache->read("forums");

$trow = alt_trow(1);

Zeile 1035Zeile 1061
		{
case "pgsql":
case "sqlite":

		{
case "pgsql":
case "sqlite":

				$query = $db->query("

				$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)

					SELECT d.*, u.username, f.name AS fname
FROM ".TABLE_PREFIX."delayedmoderation d
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid)

Zeile 1060Zeile 1086
		while($delayedmod = $db->fetch_array($query))
{
$delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);

		while($delayedmod = $db->fetch_array($query))
{
$delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);

 
			$delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']);

			$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']);
$delayedmod['action'] = $actions[$delayedmod['type']];
$info = '';
if(strpos($delayedmod['tids'], ',') === false)
{

			$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']);
$delayedmod['action'] = $actions[$delayedmod['type']];
$info = '';
if(strpos($delayedmod['tids'], ',') === false)
{

				$info .= "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($delayedmod['tids'])."\">{$thread['subject']}</a><br />";



				$delayed_thread['link'] = get_thread_link($delayedmod['tids']);
$delayed_thread['subject'] = htmlspecialchars_uni($thread['subject']);
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_single")."\";");

			}
else

			}
else

			{
$info .= "<strong>{$lang->thread}</strong> {$lang->multiple_threads}<br />";
}

			{
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_multiple")."\";");
}


if($delayedmod['fname'])


if($delayedmod['fname'])

			{
$info .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($delayedmod['fid'])."\">".htmlspecialchars_uni($delayedmod['fname'])."</a><br />";



			{
$delayedmod['link'] = get_forum_link($delayedmod['fid']);
$delayedmod['fname'] = htmlspecialchars_uni($delayedmod['fname']);
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_forum")."\";");

			}
$delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);

if($delayedmod['type'] == 'move')
{

			}
$delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);

if($delayedmod['type'] == 'move')
{

				$info .= "<strong>{$lang->new_forum}</strong>  <a href=\"".get_forum_link($delayedmod['inputs']['new_forum'])."\">".htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name'])."</a><br />";




				$delayedmod['link'] = get_forum_link($delayedmod['inputs']['new_forum']);
$delayedmod['name'] = htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name']);
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_new_forum")."\";");


				if($delayedmod['inputs']['method'] == "redirect")
{

				if($delayedmod['inputs']['method'] == "redirect")
{

					$info .= "<strong>{$lang->leave_redirect_for}</strong> ".(int)$delayedmod['inputs']['redirect_expire']." {$lang->days}<br />";










					if((int)$delayedmod['inputs']['redirect_expire'] == 0)
{
$redirect_expire_bit = $lang->redirect_forever;
}
else
{
$redirect_expire_bit = (int)$delayedmod['inputs']['redirect_expire']." {$lang->days}";
}

eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_redirect")."\";");

				}
}
else if($delayedmod['type'] == 'merge')
{

				}
}
else if($delayedmod['type'] == 'merge')
{

				$info .= "<strong>{$lang->new_subject}</strong> ".htmlspecialchars_uni($delayedmod['inputs']['subject'])."<br />";
$info .= "<strong>{$lang->thread_to_merge_with}</strong> <a href=\"".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."\">".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."</a><br />";


				$delayedmod['subject'] = htmlspecialchars_uni($delayedmod['inputs']['subject']);
$delayedmod['threadurl'] = htmlspecialchars_uni($delayedmod['inputs']['threadurl']);
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_merge")."\";");

			}

eval("\$delayedmods .= \"".$templates->get("moderation_threadnotes_delayedmodaction")."\";");

			}

eval("\$delayedmods .= \"".$templates->get("moderation_threadnotes_delayedmodaction")."\";");

Zeile 1143Zeile 1187
			$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 1334Zeile 1379
		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 2864Zeile 2910
			$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 3008Zeile 3054
					'order_by' => 'dateline',
'order_dir' => 'asc'
);

					'order_by' => 'dateline',
'order_dir' => 'asc'
);

				$query = $db->simple_select("posts", "DISTINCT tid", "pid IN (".implode(',',$pids).")", $options);

				$query = $db->simple_select("posts", "DISTINCT tid, dateline", "pid IN (".implode(',',$pids).")", $options);

				while($row = $db->fetch_array($query))
{
$tids[] = $row['tid'];

				while($row = $db->fetch_array($query))
{
$tids[] = $row['tid'];