Vergleich moderation.php - 1.8.18 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 39Zeile 39
$fid = $mybb->get_input('fid', MyBB::INPUT_INT);
$pmid = $mybb->get_input('pmid', MyBB::INPUT_INT);
$modal = $mybb->get_input('modal', MyBB::INPUT_INT);

$fid = $mybb->get_input('fid', MyBB::INPUT_INT);
$pmid = $mybb->get_input('pmid', MyBB::INPUT_INT);
$modal = $mybb->get_input('modal', MyBB::INPUT_INT);

 

if($mybb->user['uid'] == 0)
{
error_no_permission();
}



if($pid)
{


if($pid)
{

Zeile 46Zeile 52
	if(!$post)
{
error($lang->error_invalidpost, $lang->error);

	if(!$post)
{
error($lang->error_invalidpost, $lang->error);

	}

	}

	$tid = $post['tid'];
}


	$tid = $post['tid'];
}


Zeile 73Zeile 79
}

if($pmid > 0)

}

if($pmid > 0)

{

{

	$query = $db->simple_select('privatemessages', 'uid, subject, ipaddress, fromid', "pmid = $pmid");

$pm = $db->fetch_array($query);

	$query = $db->simple_select('privatemessages', 'uid, subject, ipaddress, fromid', "pmid = $pmid");

$pm = $db->fetch_array($query);

Zeile 93Zeile 99
		break;
case "allreports":
add_breadcrumb($lang->all_reported_posts);

		break;
case "allreports":
add_breadcrumb($lang->all_reported_posts);

		break;

		break;


}



}


Zeile 105Zeile 111
}

if(isset($forum))

}

if(isset($forum))

{

{

	// Check if this forum is password protected and we have a valid password
check_forum_password($forum['fid']);
}

	// Check if this forum is password protected and we have a valid password
check_forum_password($forum['fid']);
}

Zeile 123Zeile 129
	}

$modlogdata['tids'] = (array)$tids;

	}

$modlogdata['tids'] = (array)$tids;





	unset($tids);
}

	unset($tids);
}





$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']);
eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");

$mybb->user['username'] = htmlspecialchars_uni($mybb->user['username']);
eval("\$loginbox = \"".$templates->get("changeuserbox")."\";");





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

if($mybb->request_method != "post" && !in_array($mybb->input['action'], $allowable_moderation_actions))

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

Zeile 142Zeile 148
{
// Delayed Moderation
case "cancel_delayedmoderation":

{
// Delayed Moderation
case "cancel_delayedmoderation":

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

add_breadcrumb($lang->delayed_moderation);
if(!is_moderator($fid, "canmanagethreads"))
{

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

add_breadcrumb($lang->delayed_moderation);
if(!is_moderator($fid, "canmanagethreads"))
{

			error_no_permission();
}


			error_no_permission();
}


Zeile 255Zeile 261
					$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))

					$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'];

				if(is_member($tool['groups']))
{
$allowed_types[] = "modtool_".$tool['tid'];

Zeile 363Zeile 369

$rundate_format = my_date('relative', $rundate, '', 2);
$lang->redirect_delayed_moderation_thread = $lang->sprintf($lang->redirect_delayed_moderation_thread, $rundate_format);


$rundate_format = my_date('relative', $rundate, '', 2);
$lang->redirect_delayed_moderation_thread = $lang->sprintf($lang->redirect_delayed_moderation_thread, $rundate_format);





				if(!empty($mybb->input['tid']))
{
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_delayed_moderation_thread);

				if(!empty($mybb->input['tid']))
{
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_delayed_moderation_thread);

Zeile 420Zeile 426
			$method_selected = array('move' => 'checked="checked"', 'redirect' => '', 'copy' => '');

$mybb->input['delayedmoderation']['redirect_expire'] = '';

			$method_selected = array('move' => 'checked="checked"', 'redirect' => '', 'copy' => '');

$mybb->input['delayedmoderation']['redirect_expire'] = '';

			$mybb->input['delayedmoderation']['subject'] = $thread['subject'];

			$mybb->input['delayedmoderation']['subject'] = isset($thread['subject']) ? $thread['subject'] : '';

			$mybb->input['delayedmoderation']['threadurl'] = '';

$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "delayedmoderation[new_forum]");

			$mybb->input['delayedmoderation']['threadurl'] = '';

$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "delayedmoderation[new_forum]");

Zeile 468Zeile 474
		if($tid == 0)
{
// Inline thread moderation is used

		if($tid == 0)
{
// Inline thread moderation is used

			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

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

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

Zeile 532Zeile 538
					");
}
}

					");
}
}

		



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

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

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

			$delayedmod['dateline'] = my_date('normal', $delayedmod['delaydateline'], "", 2);

			$delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']);
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']);
$delayedmod['action'] = $actions[$delayedmod['type']];

			$delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']);
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']);
$delayedmod['action'] = $actions[$delayedmod['type']];

Zeile 550Zeile 556
			else
{
eval("\$info .= \"".$templates->get("moderation_delayedmodaction_notes_thread_multiple")."\";");

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

			}

			}


if($delayedmod['fname'])
{


if($delayedmod['fname'])
{

Zeile 581Zeile 587
				}
}
elseif($delayedmod['type'] == 'merge')

				}
}
elseif($delayedmod['type'] == 'merge')

			{

			{

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

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

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


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

		$plugins->run_hooks("moderation_deletethread");

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

		break;


		break;


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

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

	// 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(!is_moderator($fid, "candeletethreads"))

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


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


		$plugins->run_hooks("moderation_do_deletethread");

// Log the subject of the deleted thread
$modlogdata['thread_subject'] = $thread['subject'];

		$plugins->run_hooks("moderation_do_deletethread");

// Log the subject of the deleted thread
$modlogdata['thread_subject'] = $thread['subject'];





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

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

Zeile 838Zeile 844
	// 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 850Zeile 856
		$plugins->run_hooks("moderation_deletepoll");

$query = $db->simple_select("polls", "pid", "tid='$tid'");

		$plugins->run_hooks("moderation_deletepoll");

$query = $db->simple_select("polls", "pid", "tid='$tid'");

		$poll = $db->fetch_array($query);
if(!$poll)

		$poll = $db->fetch_array($query);
if(!$poll)

		{
error($lang->error_invalidpoll, $lang->error);
}

		{
error($lang->error_invalidpoll, $lang->error);
}

Zeile 861Zeile 867
		break;

// Delete the actual poll here!

		break;

// Delete the actual poll here!

	case "do_deletepoll":


	case "do_deletepoll":


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

if($thread['visible'] == -1)
{
error($lang->error_thread_deleted, $lang->error);

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

if($thread['visible'] == -1)
{
error($lang->error_thread_deleted, $lang->error);

		}

		}


if(!isset($mybb->input['delete']))
{


if(!isset($mybb->input['delete']))
{

Zeile 881Zeile 887
			{
error_no_permission();
}

			{
error_no_permission();
}

		}

		}

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

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





		$plugins->run_hooks("moderation_do_deletepoll");

$lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']);

		$plugins->run_hooks("moderation_do_deletepoll");

$lang->poll_deleted = $lang->sprintf($lang->poll_deleted, $thread['subject']);

Zeile 901Zeile 907

// 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();
}

if($thread['visible'] == -1)
{
error($lang->error_thread_deleted, $lang->error);
}

$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();
}

if($thread['visible'] == -1)
{
error($lang->error_thread_deleted, $lang->error);
}

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

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

		$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":

Zeile 957Zeile 963

// Restore a thread
case "restorethread":


// Restore a thread
case "restorethread":


// Verify incoming POST request


// Verify incoming POST request

		verify_post_check($mybb->get_input('my_post_key'));

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

		verify_post_check($mybb->get_input('my_post_key'));

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

Zeile 1014Zeile 1020

$plugins->run_hooks("moderation_move");



$plugins->run_hooks("moderation_move");


		$forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto");

		$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");

		eval("\$movethread = \"".$templates->get("moderation_move")."\";");
output_page($movethread);
break;

		eval("\$movethread = \"".$templates->get("moderation_move")."\";");
output_page($movethread);
break;

Zeile 1046Zeile 1052
		
$newperms = forum_permissions($moveto);
if($newperms['canview'] == 0 && !is_moderator($fid, "canmovetononmodforum"))

		
$newperms = forum_permissions($moveto);
if($newperms['canview'] == 0 && !is_moderator($fid, "canmovetononmodforum"))

		{

		{

			error($lang->error_movetononmodforum, $lang->error);
}

$newforum = get_forum($moveto);
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')

			error($lang->error_movetononmodforum, $lang->error);
}

$newforum = get_forum($moveto);
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')

		{

		{

			error($lang->error_invalidforum, $lang->error);

			error($lang->error_invalidforum, $lang->error);

		}

		}

		if($method != "copy" && $thread['fid'] == $moveto)
{
error($lang->error_movetosameforum, $lang->error);

		if($method != "copy" && $thread['fid'] == $moveto)
{
error($lang->error_movetosameforum, $lang->error);

		}


		}


		$plugins->run_hooks('moderation_do_move');

$expire = 0;
if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0)
{
$expire = TIME_NOW + ($mybb->get_input('redirect_expire', MyBB::INPUT_INT) * 86400);

		$plugins->run_hooks('moderation_do_move');

$expire = 0;
if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0)
{
$expire = TIME_NOW + ($mybb->get_input('redirect_expire', MyBB::INPUT_INT) * 86400);

		}

		}


$the_thread = $tid;



$the_thread = $tid;


Zeile 1136Zeile 1142
			$modactions = '';
while($modaction = $db->fetch_array($query))
{

			$modactions = '';
while($modaction = $db->fetch_array($query))
{

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

				$modaction['dateline'] = my_date('relative', $modaction['dateline']);

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

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

Zeile 1226Zeile 1232
		$delayedmods = '';
while($delayedmod = $db->fetch_array($query))
{

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

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

			$delayedmod['dateline'] = my_date('normal', $delayedmod['delaydateline'], "", 2);

			$delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']);
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']);
$delayedmod['action'] = $actions[$delayedmod['type']];

			$delayedmod['username'] = htmlspecialchars_uni($delayedmod['username']);
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']);
$delayedmod['action'] = $actions[$delayedmod['type']];

Zeile 1284Zeile 1290
		{
$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 1299Zeile 1305
		verify_post_check($mybb->get_input('my_post_key'));

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

		verify_post_check($mybb->get_input('my_post_key'));

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

		{
error_no_permission();
}

$plugins->run_hooks("moderation_do_threadnotes");

		{
error_no_permission();
}

$plugins->run_hooks("moderation_do_threadnotes");


log_moderator_action($modlogdata, $lang->thread_notes_edited);
$sqlarray = array(


log_moderator_action($modlogdata, $lang->thread_notes_edited);
$sqlarray = array(

Zeile 1336Zeile 1342
		if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canuseipsearch'] == 1)
{
$ipaddress = $post['ipaddress'];

		if($mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canuseipsearch'] == 1)
{
$ipaddress = $post['ipaddress'];

			eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
}


			eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
}


		$plugins->run_hooks('moderation_getip');

if($modal)

		$plugins->run_hooks('moderation_getip');

if($modal)

Zeile 1489Zeile 1495
		elseif(!empty($parameters['tid']))
{
$mergetid = (int)$parameters['tid'];

		elseif(!empty($parameters['tid']))
{
$mergetid = (int)$parameters['tid'];

		}
else
{

		}
else
{

			$mergetid = 0;
}
$mergethread = get_thread($mergetid);
if(!$mergethread)
{
error($lang->error_badmergeurl, $lang->error);

			$mergetid = 0;
}
$mergethread = get_thread($mergetid);
if(!$mergethread)
{
error($lang->error_badmergeurl, $lang->error);

		}

		}

		if($mergetid == $tid)
{ // sanity check
error($lang->error_mergewithself, $lang->error);
}
if(!is_moderator($mergethread['fid'], "canmanagethreads"))

		if($mergetid == $tid)
{ // sanity check
error($lang->error_mergewithself, $lang->error);
}
if(!is_moderator($mergethread['fid'], "canmanagethreads"))

		{

		{

			error_no_permission();
}
if(isset($mybb->input['subject']))

			error_no_permission();
}
if(isset($mybb->input['subject']))

Zeile 1514Zeile 1520
		else
{
$subject = $thread['subject'];

		else
{
$subject = $thread['subject'];

		}

$moderation->merge_threads($mergetid, $tid, $subject);


		}

$moderation->merge_threads($mergetid, $tid, $subject);


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

moderation_redirect(get_thread_link($tid), $lang->redirect_threadsmerged);

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

moderation_redirect(get_thread_link($tid), $lang->redirect_threadsmerged);

Zeile 1529Zeile 1535
		if(!is_moderator($fid, "canmanagethreads"))
{
error_no_permission();

		if(!is_moderator($fid, "canmanagethreads"))
{
error_no_permission();

		}


		}


		if($thread['visible'] == -1)
{
error($lang->error_thread_deleted, $lang->error);

		if($thread['visible'] == -1)
{
error($lang->error_thread_deleted, $lang->error);

Zeile 1541Zeile 1547
			FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
WHERE tid='$tid'

			FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
WHERE tid='$tid'

			ORDER BY dateline ASC

			ORDER BY dateline ASC, pid ASC

		");

		");





		$numposts = $db->num_rows($query);
if($numposts <= 1)
{
error($lang->error_cantsplitonepost, $lang->error);

		$numposts = $db->num_rows($query);
if($numposts <= 1)
{
error($lang->error_cantsplitonepost, $lang->error);

		}

		}


$altbg = "trow1";
$posts = '';
while($post = $db->fetch_array($query))


$altbg = "trow1";
$posts = '';
while($post = $db->fetch_array($query))

		{

		{

			$postdate = my_date('relative', $post['dateline']);
$post['username'] = htmlspecialchars_uni($post['username']);


			$postdate = my_date('relative', $post['dateline']);
$post['username'] = htmlspecialchars_uni($post['username']);


Zeile 1569Zeile 1575
			{
$parser_options['allow_smilies'] = 0;
}

			{
$parser_options['allow_smilies'] = 0;
}





			$message = $parser->parse_message($post['message'], $parser_options);
eval("\$posts .= \"".$templates->get("moderation_split_post")."\";");
$altbg = alt_trow();

			$message = $parser->parse_message($post['message'], $parser_options);
eval("\$posts .= \"".$templates->get("moderation_split_post")."\";");
$altbg = alt_trow();

Zeile 1586Zeile 1592

// Let's break them up buddy! (Do the split)
case "do_split":


// Let's break them up buddy! (Do the split)
case "do_split":


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

if(!is_moderator($fid, "canmanagethreads"))
{
error_no_permission();
}

if($thread['visible'] == -1)


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

if(!is_moderator($fid, "canmanagethreads"))
{
error_no_permission();
}

if($thread['visible'] == -1)

		{
error($lang->error_thread_deleted, $lang->error);
}

		{
error($lang->error_thread_deleted, $lang->error);
}

Zeile 1621Zeile 1627
		}

if(!empty($mybb->input['moveto']))

		}

if(!empty($mybb->input['moveto']))

		{

		{

			$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);

			$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);

		}

		}

		else
{
$moveto = $fid;

		else
{
$moveto = $fid;

		}


		}


		$newforum = get_forum($moveto);
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
{
error($lang->error_invalidforum, $lang->error);
}

		$newforum = get_forum($moveto);
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
{
error($lang->error_invalidforum, $lang->error);
}





		$pids = array();

// move the selected posts over

		$pids = array();

// move the selected posts over

Zeile 1646Zeile 1652
				$pids[] = $post['pid'];
}
mark_reports($post['pid'], "post");

				$pids[] = $post['pid'];
}
mark_reports($post['pid'], "post");

		}


		}


		$newtid = $moderation->split_posts($pids, $tid, $moveto, $mybb->get_input('newsubject'));

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

Zeile 1664Zeile 1670
		if(!is_moderator($fid, "canmanagethreads"))
{
error_no_permission();

		if(!is_moderator($fid, "canmanagethreads"))
{
error_no_permission();

		}


		}


		if($thread['visible'] == -1)
{
error($lang->error_thread_deleted, $lang->error);

		if($thread['visible'] == -1)
{
error($lang->error_thread_deleted, $lang->error);

Zeile 1689Zeile 1695
			// 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();
}

		}
else
{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'candeletethreads'))

		}
else
{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'candeletethreads'))

			{
error_no_permission();
}

			{
error_no_permission();
}

		}
if(count($threads) < 1)
{

		}
if(count($threads) < 1)
{

Zeile 1707Zeile 1713
		}

$inlineids = implode("|", $threads);

		}

$inlineids = implode("|", $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');
}
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
eval("\$multidelete = \"".$templates->get("moderation_inline_deletethreads")."\";");
output_page($multidelete);

			clearinline($fid, 'forum');
}
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
eval("\$multidelete = \"".$templates->get("moderation_inline_deletethreads")."\";");
output_page($multidelete);

		break;


		break;


	// Actually delete the threads - Inline moderation
case "do_multideletethreads":

	// Actually delete the threads - Inline moderation
case "do_multideletethreads":


// 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'));


		$threadlist = explode("|", $mybb->get_input('threads'));
if(!is_moderator_by_tids($threadlist, "candeletethreads"))
{

		$threadlist = explode("|", $mybb->get_input('threads'));
if(!is_moderator_by_tids($threadlist, "candeletethreads"))
{

Zeile 1751Zeile 1757
		break;

// Open threads - Inline moderation

		break;

// Open threads - Inline moderation

	case "multiopenthreads":

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

if(!empty($mybb->input['searchid']))
{
// From search page
$threads = getids($mybb->get_input('searchid'), 'search');
if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
{
error_no_permission();
}
}
else
{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canopenclosethreads'))
{
error_no_permission();

	case "multiopenthreads":

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

if(!empty($mybb->input['searchid']))
{
// From search page
$threads = getids($mybb->get_input('searchid'), 'search');
if(!is_moderator_by_tids($threads, 'canopenclosethreads'))
{
error_no_permission();
}
}
else
{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canopenclosethreads'))
{
error_no_permission();

			}
}

if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected, $lang->error);

			}
}

if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected, $lang->error);

		}


		}


		$moderation->open_threads($threads);

log_moderator_action($modlogdata, $lang->multi_opened_threads);
if($mybb->get_input('inlinetype') == 'search')

		$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
{
clearinline($fid, 'forum');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
}
else
{
clearinline($fid, 'forum');

		}

		}

		moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsopened);
break;

// Close threads - Inline moderation
case "multiclosethreads":

		moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsopened);
break;

// Close threads - Inline moderation
case "multiclosethreads":





		// 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 1812Zeile 1818
		{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canopenclosethreads'))

		{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canopenclosethreads'))

			{
error_no_permission();
}
}
if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected, $lang->error);
}

			{
error_no_permission();
}
}
if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected, $lang->error);
}


$moderation->close_threads($threads);



$moderation->close_threads($threads);


Zeile 1862Zeile 1868
		{
error($lang->error_inline_nothreadsselected, $lang->error);
}

		{
error($lang->error_inline_nothreadsselected, $lang->error);
}





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

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

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

log_moderator_action($modlogdata, $lang->multi_approved_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');
}
$cache->update_stats();

			clearinline($fid, 'forum');
}
$cache->update_stats();

Zeile 1889Zeile 1895
			// 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
{
$threads = getids($fid, 'forum');

		else
{
$threads = getids($fid, 'forum');

Zeile 1909Zeile 1915
		$moderation->unapprove_threads($threads, $fid);

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

		$moderation->unapprove_threads($threads, $fid);

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

		if($mybb->get_input('inlinetype') == 'search')
{
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
}
else
{
clearinline($fid, 'forum');
}
$cache->update_stats();

		if($mybb->get_input('inlinetype') == 'search')
{
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
}
else
{
clearinline($fid, 'forum');
}
$cache->update_stats();

		moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunapproved);
break;


		moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunapproved);
break;


Zeile 1932Zeile 1938
			// From search page
$threads = getids($mybb->get_input('searchid'), 'search');
if(!is_moderator_by_tids($threads, 'canrestorethreads'))

			// From search page
$threads = getids($mybb->get_input('searchid'), 'search');
if(!is_moderator_by_tids($threads, 'canrestorethreads'))

			{
error_no_permission();
}
}
else

			{
error_no_permission();
}
}
else

		{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canrestorethreads'))

		{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canrestorethreads'))

Zeile 1947Zeile 1953
		if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected, $lang->error);

		if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected, $lang->error);

		}


		}


		$moderation->restore_threads($threads);

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

		$moderation->restore_threads($threads);

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

Zeile 1965Zeile 1971
		break;

// Soft delete threads - Inline moderation

		break;

// Soft delete threads - Inline moderation

	case "multisoftdeletethreads":

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

if(!empty($mybb->input['searchid']))

	case "multisoftdeletethreads":

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

if(!empty($mybb->input['searchid']))

		{
// From search page
$threads = getids($mybb->get_input('searchid'), 'search');
if(!is_moderator_by_tids($threads, 'cansoftdeletethreads'))

		{
// From search page
$threads = getids($mybb->get_input('searchid'), 'search');
if(!is_moderator_by_tids($threads, 'cansoftdeletethreads'))

			{

			{

				error_no_permission();
}
}

				error_no_permission();
}
}

Zeile 1986Zeile 1992
			{
error_no_permission();
}

			{
error_no_permission();
}

		}

		}

		if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected, $lang->error);

		if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected, $lang->error);

		}


		}


		$moderation->soft_delete_threads($threads);

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

		$moderation->soft_delete_threads($threads);

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

Zeile 2008Zeile 2014
		break;

// Stick threads - Inline moderation

		break;

// Stick threads - Inline moderation

	case "multistickthreads":

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

if(!empty($mybb->input['searchid']))
{
// From search page
$threads = getids($mybb->get_input('searchid'), 'search');
if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))
{
error_no_permission();
}
}
else

	case "multistickthreads":

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

if(!empty($mybb->input['searchid']))
{
// From search page
$threads = getids($mybb->get_input('searchid'), 'search');
if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))
{
error_no_permission();
}
}
else

		{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canstickunstickthreads'))

		{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canstickunstickthreads'))

Zeile 2033Zeile 2039
		if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected, $lang->error);

		if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected, $lang->error);

		}


		}


		$moderation->stick_threads($threads);

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

		$moderation->stick_threads($threads);

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

Zeile 2060Zeile 2066
			// From search page
$threads = getids($mybb->get_input('searchid'), 'search');
if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))

			// From search page
$threads = getids($mybb->get_input('searchid'), 'search');
if(!is_moderator_by_tids($threads, 'canstickunstickthreads'))

			{
error_no_permission();
}
}
else

			{
error_no_permission();
}
}
else

		{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canstickunstickthreads'))

		{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canstickunstickthreads'))

Zeile 2139Zeile 2145
		verify_post_check($mybb->get_input('my_post_key'));

$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);

		verify_post_check($mybb->get_input('my_post_key'));

$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);

 
		$method = $mybb->get_input('method');


		$threadlist = explode("|", $mybb->get_input('threads'));
if(!is_moderator_by_tids($threadlist, 'canmanagethreads'))

		$threadlist = explode("|", $mybb->get_input('threads'));
if(!is_moderator_by_tids($threadlist, 'canmanagethreads'))

		{

		{

			error_no_permission();
}
foreach($threadlist as $tid)
{
$tids[] = (int)$tid;

			error_no_permission();
}
foreach($threadlist as $tid)
{
$tids[] = (int)$tid;

		}

		}

		// Make sure moderator has permission to move to the new forum
$newperms = forum_permissions($moveto);
if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, 'canmovetononmodforum'))
{
error($lang->error_movetononmodforum, $lang->error);

		// Make sure moderator has permission to move to the new forum
$newperms = forum_permissions($moveto);
if(($newperms['canview'] == 0 || !is_moderator($moveto, 'canmanagethreads')) && !is_moderator_by_tids($tids, 'canmovetononmodforum'))
{
error($lang->error_movetononmodforum, $lang->error);

		}

		}


$newforum = get_forum($moveto);
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
{
error($lang->error_invalidforum, $lang->error);


$newforum = get_forum($moveto);
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')
{
error($lang->error_invalidforum, $lang->error);

		}

$moderation->move_threads($tids, $moveto);

		}

$plugins->run_hooks('moderation_do_multimovethreads');


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


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

 
		$expire = 0;
if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0)
{
$expire = TIME_NOW + ($mybb->get_input('redirect_expire', MyBB::INPUT_INT) * 86400);
}

foreach($tids as $tid) {
$moderation->move_thread($tid, $moveto, $method, $expire);
}


moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved);
break;


moderation_redirect(get_forum_link($moveto), $lang->redirect_inline_threadsmoved);
break;

Zeile 2304Zeile 2321
			}
}


			}
}


		if(empty($posts))

		if(count($posts) < 2)

		{

		{

			error($lang->error_inline_nopostsselected, $lang->error);





			if(empty($posts))
{
error($lang->error_inline_nopostsselected, $lang->error);
}
error($lang->error_nomergeposts, $lang->error);

		}

if(!is_moderator_by_pids($posts, "canmanagethreads"))

		}

if(!is_moderator_by_pids($posts, "canmanagethreads"))

Zeile 2319Zeile 2340
			SELECT p.*, u.*
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)

			SELECT p.*, u.*
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)

			WHERE pid IN (".implode($posts, ",").")
ORDER BY dateline ASC

			WHERE pid IN (".implode(",", $posts).")
ORDER BY dateline ASC, pid ASC

		");
$altbg = "trow1";
while($post = $db->fetch_array($query))

		");
$altbg = "trow1";
while($post = $db->fetch_array($query))

Zeile 2368Zeile 2389
		verify_post_check($mybb->get_input('my_post_key'));

$mergepost = $mybb->get_input('mergepost', MyBB::INPUT_ARRAY);

		verify_post_check($mybb->get_input('my_post_key'));

$mergepost = $mybb->get_input('mergepost', MyBB::INPUT_ARRAY);

		if(count($mergepost) <= 1)

		if(count($mergepost) < 2)

		{
error($lang->error_nomergeposts, $lang->error);
}

		{
error($lang->error_nomergeposts, $lang->error);
}

Zeile 2379Zeile 2400
		}

if(!is_moderator_by_pids($postlist, "canmanagethreads"))

		}

if(!is_moderator_by_pids($postlist, "canmanagethreads"))

		{
error_no_permission();
}

$masterpid = $moderation->merge_posts($postlist, $tid, $mybb->input['sep']);


		{
error_no_permission();
}

$masterpid = $moderation->merge_posts($postlist, $tid, $mybb->input['sep']);


		mark_reports($postlist, "posts");
log_moderator_action($modlogdata, $lang->merged_selective_posts);
moderation_redirect(get_post_link($masterpid)."#pid$masterpid", $lang->redirect_inline_postsmerged);
break;

		mark_reports($postlist, "posts");
log_moderator_action($modlogdata, $lang->merged_selective_posts);
moderation_redirect(get_post_link($masterpid)."#pid$masterpid", $lang->redirect_inline_postsmerged);
break;





	// Split posts - Inline moderation
case "multisplitposts":
add_breadcrumb($lang->nav_multi_splitposts);

	// Split posts - Inline moderation
case "multisplitposts":
add_breadcrumb($lang->nav_multi_splitposts);


if($mybb->get_input('inlinetype') == 'search')
{
$posts = getids($mybb->get_input('searchid'), 'search');
}
else
{
$posts = getids($tid, 'thread');
}

if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected, $lang->error);
}

if(!is_moderator_by_pids($posts, "canmanagethreads"))
{
error_no_permission();
}
$posts = array_map('intval', $posts);
$pidin = implode(',', $posts);

// Make sure that we are not splitting a thread with one post
// Select number of posts in each thread that the splitted post is in
$query = $db->query("
SELECT DISTINCT p.tid, COUNT(q.pid) as count
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid)
WHERE p.pid IN ($pidin)
GROUP BY p.tid, p.pid
");
$threads = $pcheck = array();
while($tcheck = $db->fetch_array($query))
{
if((int)$tcheck['count'] <= 1)
{
error($lang->error_cantsplitonepost, $lang->error);
}
$threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below
}

// Make sure that we are not splitting 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))
{
if($tcheck['count'] > 0)
{
$pcheck2[] = $tcheck['tid'];
}
}
if(count($pcheck2) != count($pcheck))
{
// One or more threads do not have posts after splitting


if($mybb->get_input('inlinetype') == 'search')
{
$posts = getids($mybb->get_input('searchid'), 'search');
}
else
{
$posts = getids($tid, 'thread');
}

if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected, $lang->error);
}

if(!is_moderator_by_pids($posts, "canmanagethreads"))
{
error_no_permission();
}
$posts = array_map('intval', $posts);
$pidin = implode(',', $posts);

// Make sure that we are not splitting a thread with one post
// Select number of posts in each thread that the splitted post is in
$query = $db->query("
SELECT DISTINCT p.tid, COUNT(q.pid) as count
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid)
WHERE p.pid IN ($pidin)
GROUP BY p.tid, p.pid
");
$threads = $pcheck = array();
while($tcheck = $db->fetch_array($query))
{
if((int)$tcheck['count'] <= 1)
{
error($lang->error_cantsplitonepost, $lang->error);
}
$threads[] = $pcheck[] = $tcheck['tid']; // Save tids for below
}

// Make sure that we are not splitting 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))
{
if($tcheck['count'] > 0)
{
$pcheck2[] = $tcheck['tid'];
}
}
if(count($pcheck2) != count($pcheck))
{
// One or more threads do not have posts after splitting

			error($lang->error_cantsplitall, $lang->error);
}


			error($lang->error_cantsplitall, $lang->error);
}


Zeile 2463Zeile 2484
			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");





		$return_url = htmlspecialchars_uni($mybb->get_input('url'));

eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";");

		$return_url = htmlspecialchars_uni($mybb->get_input('url'));

eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";");

Zeile 2486Zeile 2507
		{
$pid = (int)$pid;
$plist[] = $pid;

		{
$pid = (int)$pid;
$plist[] = $pid;

		}

if(!is_moderator_by_pids($plist, "canmanagethreads"))
{
error_no_permission();

		}

if(!is_moderator_by_pids($plist, "canmanagethreads"))
{
error_no_permission();

		}

// Ensure all posts exist

		}

// Ensure all posts exist

Zeile 2564Zeile 2585

$newforum = get_forum($moveto);
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')


$newforum = get_forum($moveto);
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')

		{

		{

			error($lang->error_invalidforum, $lang->error);
}


			error($lang->error_invalidforum, $lang->error);
}


Zeile 2587Zeile 2608
			$posts = getids($mybb->get_input('searchid'), 'search');
}
else

			$posts = getids($mybb->get_input('searchid'), 'search');
}
else

		{

		{

			$posts = getids($tid, 'thread');
}


			$posts = getids($tid, 'thread');
}


Zeile 2601Zeile 2622
			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, $lang->error);
}
$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))
{
if($tcheck['count'] > 0)
{
$pcheck2[] = $tcheck['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, $lang->error);
}
$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))
{
if($tcheck['count'] > 0)
{
$pcheck2[] = $tcheck['tid'];
}

		}
if(count($pcheck2) != count($pcheck))
{
// One or more threads do not have posts after splitting
error($lang->error_cantmoveall, $lang->error);

		}
if(count($pcheck2) != count($pcheck))
{
// One or more threads do not have posts after splitting
error($lang->error_cantmoveall, $lang->error);

		}

		}


$inlineids = implode("|", $posts);
if($mybb->get_input('inlinetype') == 'search')
{
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');


$inlineids = implode("|", $posts);
if($mybb->get_input('inlinetype') == 'search')
{
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}

		}

		else
{
clearinline($tid, 'thread');
}
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");

		else
{
clearinline($tid, 'thread');
}
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");

 

$return_url = htmlspecialchars_uni($mybb->get_input('url'));


		eval("\$moveposts = \"".$templates->get("moderation_inline_moveposts")."\";");
output_page($moveposts);
break;

		eval("\$moveposts = \"".$templates->get("moderation_inline_moveposts")."\";");
output_page($moveposts);
break;

Zeile 2666Zeile 2690
		verify_post_check($mybb->get_input('my_post_key'));

$plugins->run_hooks("moderation_do_multimoveposts");

		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'));
$mybb->input['threadurl'] = $realurl[0];

		// 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];

Zeile 2677Zeile 2701
			// Get thread to merge's tid the SEO way
preg_match("#thread-([0-9]+)?#i", $mybb->input['threadurl'], $threadmatch);
preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);

			// Get thread to merge's tid the SEO way
preg_match("#thread-([0-9]+)?#i", $mybb->input['threadurl'], $threadmatch);
preg_match("#post-([0-9]+)?#i", $mybb->input['threadurl'], $postmatch);


if($threadmatch[1])


if(!empty($threadmatch[1]))

			{
$parameters['tid'] = $threadmatch[1];
}


			{
$parameters['tid'] = $threadmatch[1];
}


			if($postmatch[1])

			if(!empty($postmatch[1]))

			{
$parameters['pid'] = $postmatch[1];
}

			{
$parameters['pid'] = $postmatch[1];
}

Zeile 2743Zeile 2767
		}

if(!is_moderator_by_pids($plist, "canmanagethreads"))

		}

if(!is_moderator_by_pids($plist, "canmanagethreads"))

		{
error_no_permission();
}

		{
error_no_permission();
}


// Ensure all posts exist
$posts = array();


// Ensure all posts exist
$posts = array();

Zeile 2759Zeile 2783
		}

if(empty($posts))

		}

if(empty($posts))

		{

		{

			error($lang->error_inline_nopostsselected, $lang->error);
}


			error($lang->error_inline_nopostsselected, $lang->error);
}


Zeile 2772Zeile 2796
			FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid)
WHERE p.pid IN ($pidin)

			FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."posts q ON (p.tid=q.tid)
WHERE p.pid IN ($pidin)

			GROUP BY p.tid, p.pid

			GROUP BY p.tid, p.pid

		");
$threads = $pcheck = array();
while($tcheck = $db->fetch_array($query))

		");
$threads = $pcheck = array();
while($tcheck = $db->fetch_array($query))

Zeile 2799Zeile 2823
			if($tcheck['count'] > 0)
{
$pcheck2[] = $tcheck['tid'];

			if($tcheck['count'] > 0)
{
$pcheck2[] = $tcheck['tid'];

			}
}

			}
}

		if(count($pcheck2) != count($pcheck))
{
// One or more threads do not have posts after splitting
error($lang->error_cantmoveall, $lang->error);

		if(count($pcheck2) != count($pcheck))
{
// One or more threads do not have posts after splitting
error($lang->error_cantmoveall, $lang->error);

		}

		}


$newtid = $moderation->split_posts($posts, $tid, $newthread['fid'], $db->escape_string($newthread['subject']), $newtid);



$newtid = $moderation->split_posts($posts, $tid, $newthread['fid'], $db->escape_string($newthread['subject']), $newtid);


Zeile 2821Zeile 2845

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


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


if($mybb->get_input('inlinetype') == 'search')
{


if($mybb->get_input('inlinetype') == 'search')
{

			$posts = getids($mybb->get_input('searchid'), 'search');

			$posts = getids($mybb->get_input('searchid'), 'search');

		}
else
{
$posts = getids($tid, 'thread');
}
if(count($posts) < 1)

		}
else
{
$posts = getids($tid, 'thread');
}
if(count($posts) < 1)

		{
error($lang->error_inline_nopostsselected, $lang->error);
}

if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))

		{
error($lang->error_inline_nopostsselected, $lang->error);
}

if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))

		{

		{

			error_no_permission();
}

$pids = array();
foreach($posts as $pid)

			error_no_permission();
}

$pids = array();
foreach($posts as $pid)

		{

		{

			$pids[] = (int)$pid;

			$pids[] = (int)$pid;

		}


		}


		$moderation->approve_posts($pids);

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

		$moderation->approve_posts($pids);

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

		if($mybb->get_input('inlinetype') == 'search')
{
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
}
else

		if($mybb->get_input('inlinetype') == 'search')
{
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
}
else

		{
clearinline($tid, 'thread');
}

		{
clearinline($tid, 'thread');
}

Zeile 2865Zeile 2889

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


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


if($mybb->get_input('inlinetype') == 'search')
{


if($mybb->get_input('inlinetype') == 'search')
{

			$posts = getids($mybb->get_input('searchid'), 'search');
}
else
{
$posts = getids($tid, 'thread');

			$posts = getids($mybb->get_input('searchid'), 'search');
}
else
{
$posts = getids($tid, 'thread');

		}


		}


		if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected, $lang->error);
}
$pids = array();

		if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected, $lang->error);
}
$pids = array();





		if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))
{
error_no_permission();

		if(!is_moderator_by_pids($posts, "canapproveunapproveposts"))
{
error_no_permission();

Zeile 2894Zeile 2918

log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
if($mybb->get_input('inlinetype') == 'search')


log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
if($mybb->get_input('inlinetype') == 'search')

		{

		{

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
}
else

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
}
else

Zeile 2905Zeile 2929
		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')
{
$posts = getids($mybb->get_input('searchid'), 'search');
}
else
{
$posts = getids($tid, 'thread');
}
if(count($posts) < 1)

	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($tid, 'thread');
}
if(count($posts) < 1)

		{
error($lang->error_inline_nopostsselected, $lang->error);
}

if(!is_moderator_by_pids($posts, "canrestoreposts"))

		{
error($lang->error_inline_nopostsselected, $lang->error);
}

if(!is_moderator_by_pids($posts, "canrestoreposts"))

		{

		{

			error_no_permission();
}


			error_no_permission();
}


Zeile 2937Zeile 2961
		$moderation->restore_posts($pids);

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

		$moderation->restore_posts($pids);

log_moderator_action($modlogdata, $lang->multi_restore_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_postsrestored);
break;


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


Zeile 2958Zeile 2982
			$posts = getids($mybb->get_input('searchid'), 'search');
}
else

			$posts = getids($mybb->get_input('searchid'), 'search');
}
else

		{
$posts = getids($tid, 'thread');
}


		{
$posts = getids($tid, 'thread');
}


		if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected, $lang->error);

		if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected, $lang->error);

Zeile 3002Zeile 3026

$uid = $mybb->get_input('uid', MyBB::INPUT_INT);
$user = get_user($uid);


$uid = $mybb->get_input('uid', MyBB::INPUT_INT);
$user = get_user($uid);

		if(!$user['uid'] || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid']))

		if(!$user || !purgespammer_show($user['postnum'], $user['usergroup'], $user['uid']))

		{
error($lang->purgespammer_invalid_user);
}

		{
error($lang->purgespammer_invalid_user);
}

Zeile 3052Zeile 3076
				}

// Add the IP's to the banfilters

				}

// Add the IP's to the banfilters

				foreach(array($user['regip'], $user['lastip']) as $ip)

				if($mybb->settings['purgespammerbanip'] == 1)

				{

				{

					$ip = my_inet_ntop($db->unescape_binary($ip));
$query = $db->simple_select("banfilters", "type", "type = 1 AND filter = '".$db->escape_string($ip)."'");
if($db->num_rows($query) == 0)

					foreach(array($user['regip'], $user['lastip']) as $ip)



					{

					{

						$insert = array(
"filter" => $db->escape_string($ip),
"type" => 1,
"dateline" => TIME_NOW
);
$db->insert_query("banfilters", $insert);






						$ip = my_inet_ntop($db->unescape_binary($ip));
$query = $db->simple_select("banfilters", "type", "type = 1 AND filter = '".$db->escape_string($ip)."'");
if($db->num_rows($query) == 0)
{
$insert = array(
"filter" => $db->escape_string($ip),
"type" => 1,
"dateline" => TIME_NOW
);
$db->insert_query("banfilters", $insert);
}

					}
}

// Clear the profile
$userhandler->clear_profile($uid, $mybb->settings['purgespammerbangroup']);


					}
}

// Clear the profile
$userhandler->clear_profile($uid, $mybb->settings['purgespammerbangroup']);


				$cache->update_banned();

 
				$cache->update_bannedips();
$cache->update_awaitingactivation();


				$cache->update_bannedips();
$cache->update_awaitingactivation();


Zeile 3080Zeile 3106
			elseif($mybb->settings['purgespammerbandelete'] == "delete")
{
$user_deleted = $userhandler->delete_user($uid, 1);

			elseif($mybb->settings['purgespammerbandelete'] == "delete")
{
$user_deleted = $userhandler->delete_user($uid, 1);

			}


			}


			// Submit the user to stop forum spam
if(!empty($mybb->settings['purgespammerapikey']))
{
$sfs = @fetch_remote_file("http://stopforumspam.com/add.php?username=" . urlencode($user['username']) . "&ip_addr=" . urlencode(my_inet_ntop($db->unescape_binary($user['lastip']))) . "&email=" . urlencode($user['email']) . "&api_key=" . urlencode($mybb->settings['purgespammerapikey']));

			// Submit the user to stop forum spam
if(!empty($mybb->settings['purgespammerapikey']))
{
$sfs = @fetch_remote_file("http://stopforumspam.com/add.php?username=" . urlencode($user['username']) . "&ip_addr=" . urlencode(my_inet_ntop($db->unescape_binary($user['lastip']))) . "&email=" . urlencode($user['email']) . "&api_key=" . urlencode($mybb->settings['purgespammerapikey']));

			}


			}


			log_moderator_action(array('uid' => $uid, 'username' => $user['username']), $lang->purgespammer_modlog);

if($user_deleted)
{
redirect($mybb->settings['bburl'], $lang->purgespammer_success);

			log_moderator_action(array('uid' => $uid, 'username' => $user['username']), $lang->purgespammer_modlog);

if($user_deleted)
{
redirect($mybb->settings['bburl'], $lang->purgespammer_success);

			}
else

			}
else

			{
redirect(get_profile_link($uid), $lang->purgespammer_success);
}

			{
redirect(get_profile_link($uid), $lang->purgespammer_success);
}

Zeile 3134Zeile 3160
			}

if($thread['visible'] == -1)

			}

if($thread['visible'] == -1)

			{

			{

				error($lang->error_thread_deleted, $lang->error);
}

if(!empty($options['confirmation']) && empty($mybb->input['confirm']))

				error($lang->error_thread_deleted, $lang->error);
}

if(!empty($options['confirmation']) && empty($mybb->input['confirm']))

			{

			{

				add_breadcrumb($lang->confirm_execute_tool);

$lang->confirm_execute_tool_desc = $lang->sprintf($lang->confirm_execute_tool_desc, htmlspecialchars_uni($tool['name']));


				add_breadcrumb($lang->confirm_execute_tool);

$lang->confirm_execute_tool_desc = $lang->sprintf($lang->confirm_execute_tool_desc, htmlspecialchars_uni($tool['name']));


				$action = $mybb->input['action'];
$modtype = $mybb->get_input('modtype');
$inlinetype = $mybb->get_input('inlinetype');
$searchid = $mybb->get_input('searchid');

				$action = $mybb->get_input('action', MyBB::INPUT_INT);
$modtype = htmlspecialchars_uni($mybb->get_input('modtype'));
$inlinetype = htmlspecialchars_uni($mybb->get_input('inlinetype'));
$searchid = htmlspecialchars_uni($mybb->get_input('searchid'));

				$url = htmlspecialchars_uni($mybb->get_input('url'));
$plugins->run_hooks('moderation_confirmation');


				$url = htmlspecialchars_uni($mybb->get_input('url'));
$plugins->run_hooks('moderation_confirmation');


Zeile 3161Zeile 3187

if($tool['type'] == 't' && $mybb->get_input('modtype') == 'inlinethread')
{


if($tool['type'] == 't' && $mybb->get_input('modtype') == 'inlinethread')
{

				if($mybb->get_input('inlinetype') == 'search')

				if($mybb->get_input('inlinetype') == 'search')

				{
$tids = getids($mybb->get_input('searchid'), 'search');
}

				{
$tids = getids($mybb->get_input('searchid'), 'search');
}

Zeile 3185Zeile 3211
				}

$custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids);

				}

$custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids);

 				$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);
if($mybb->get_input('inlinetype') == 'search')
{
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
$lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
redirect($return_url, $lang->redirect_customtool_search);
}

 				$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);
if($mybb->get_input('inlinetype') == 'search')
{
clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
$lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
moderation_redirect($return_url, $lang->redirect_customtool_search);
}

				else
{
clearinline($fid, "forum");

				else
{
clearinline($fid, "forum");

Zeile 3253Zeile 3279
				// Get threads which are associated with the posts
$tids = array();
$options = array(

				// Get threads which are associated with the posts
$tids = array();
$options = array(

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

					'order_by' => 'dateline, pid',


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

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

Zeile 3270Zeile 3295
					clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
$lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
$return_url = htmlspecialchars_uni($mybb->get_input('url'));

					clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
$lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
$return_url = htmlspecialchars_uni($mybb->get_input('url'));

					redirect($return_url, $lang->redirect_customtool_search);

					moderation_redirect($return_url, $lang->redirect_customtool_search);

				}
else
{

				}
else
{

Zeile 3303Zeile 3328
 * @return array
*/
function getids($id, $type)

 * @return array
*/
function getids($id, $type)

{
global $mybb;

{
global $mybb;


$newids = array();
$cookie = "inlinemod_".$type.$id;


$newids = array();
$cookie = "inlinemod_".$type.$id;

Zeile 3466Zeile 3491

/**
* Checks if the current user is a moderator of all the threads specified


/**
* Checks if the current user is a moderator of all the threads specified

 *

 *

 * 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 $threads Array of thread IDs
* @param string $permission Permission to check
* @return bool True if moderator of all; false otherwise

 * 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 $threads Array of thread IDs
* @param string $permission Permission to check
* @return bool True if moderator of all; false otherwise

 */

 */

function is_moderator_by_tids($threads, $permission='')
{
global $db, $mybb;

// Speedy determination for supermods/admins and guests
if($mybb->usergroup['issupermod'])

function is_moderator_by_tids($threads, $permission='')
{
global $db, $mybb;

// Speedy determination for supermods/admins and guests
if($mybb->usergroup['issupermod'])

	{

	{

		return true;
}
elseif(!$mybb->user['uid'])
{
return false;

		return true;
}
elseif(!$mybb->user['uid'])
{
return false;

	}

	}

	// Make an array of threads if not an array
if(!is_array($threads))
{

	// Make an array of threads if not an array
if(!is_array($threads))
{

Zeile 3519Zeile 3544
	global $mybb;
if(!empty($mybb->input['url']))
{

	global $mybb;
if(!empty($mybb->input['url']))
{

		redirect(htmlentities($mybb->input['url']), $message, $title);

		$url = htmlentities($mybb->input['url']);

	}

	}

 

if(my_strpos($url, $mybb->settings['bburl'].'/') !== 0)
{
if(my_strpos($url, '/') === 0)
{
$url = my_substr($url, 1);
}
$url_segments = explode('/', $url);
$url = $mybb->settings['bburl'].'/'.end($url_segments);
}


	redirect($url, $message, $title);
}

	redirect($url, $message, $title);
}