Vergleich moderation.php - 1.6.3 - 1.6.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: moderation.php 5380 2011-02-21 12:04:43Z Tomm $

 * $Id$

 */

define("IN_MYBB", 1);
define('THIS_SCRIPT', 'moderation.php');


 */

define("IN_MYBB", 1);
define('THIS_SCRIPT', 'moderation.php');


$templatelist = 'changeuserbox';





$templatelist = 'changeuserbox,loginbox,moderation_delayedmoderation_custommodtool,moderation_delayedmodaction_notes,moderation_delayedmoderation_merge,moderation_delayedmoderation_move';
$templatelist .= ',moderation_delayedmoderation,moderation_deletethread,moderation_deletepoll,moderation_deleteposts_post,moderation_deleteposts,moderation_mergeposts_post,moderation_mergeposts';
$templatelist .= ',moderation_move,moderation_threadnotes_modaction,moderation_threadnotes_delayedmodaction,moderation_threadnotes,moderation_getip_modoptions,moderation_getip,moderation_merge';
$templatelist .= ',moderation_split_post,moderation_split,moderation_inline_deletethreads,moderation_inline_movethreads,moderation_inline_deleteposts,moderation_inline_mergeposts';
$templatelist .= ',moderation_inline_splitposts,forumjump_bit,forumjump_special,forumjump_advanced,forumdisplay_password_wrongpass,forumdisplay_password';


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 126Zeile 130
		}
else
{

		}
else
{

			moderation_redirect("moderation.php?action=delayedmoderation&tid={$tid}&my_post_key={$mybb->post_code}", $lang->redirect_delayed_moderation_cancelled);

			moderation_redirect("moderation.php?action=delayedmoderation&tid={$tid}&my_post_key={$mybb->post_code}", $lang->redirect_delayed_moderation_cancelled);

		}
break;
case "do_delayedmoderation":

		}
break;
case "do_delayedmoderation":

Zeile 209Zeile 213
			
if($mybb->input['type'] == 'move')
{

			
if($mybb->input['type'] == 'move')
{

				$query = $db->simple_select("forums", "*", "fid='{$fid}'");
$newforum = $db->fetch_array($query);
if($newforum['type'] != 'f')

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


				{
$errors[] = $lang->error_invalidforum;
}

				{
$errors[] = $lang->error_invalidforum;
}

Zeile 919Zeile 922
			error_no_permission();
}


			error_no_permission();
}


		$query = $db->simple_select("forums", "*", "fid='$moveto'");
$newforum = $db->fetch_array($query);
if($newforum['type'] != "f")

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


		{
error($lang->error_invalidforum);

		{
error($lang->error_invalidforum);

		}

		}

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

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

Zeile 932Zeile 934

$expire = 0;
if(intval($mybb->input['redirect_expire']) > 0)


$expire = 0;
if(intval($mybb->input['redirect_expire']) > 0)

		{

		{

			$expire = TIME_NOW + (intval($mybb->input['redirect_expire']) * 86400);
}

			$expire = TIME_NOW + (intval($mybb->input['redirect_expire']) * 86400);
}





		$the_thread = $tid;

$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);

		$the_thread = $tid;

$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);

Zeile 944Zeile 946
		{
case "copy":
log_moderator_action($modlogdata, $lang->thread_copied);

		{
case "copy":
log_moderator_action($modlogdata, $lang->thread_copied);

				break;

				break;

			default:
case "move":
case "redirect":

			default:
case "move":
case "redirect":

Zeile 979Zeile 981
		{
$modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);
$modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']);

		{
$modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);
$modaction['profilelink'] = build_profile_link($modaction['username'], $modaction['uid']);

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

			$info = '';
if($modaction['tsubject'])
{

			$info = '';
if($modaction['tsubject'])
{

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

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

		
switch($db->type)
{

		
switch($db->type)
{

			case "pgsql":
case "sqlite":
$query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");

			case "pgsql":
case "sqlite":
$query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");

Zeile 1033Zeile 1036
		{
case "pgsql":
case "sqlite":

		{
case "pgsql":
case "sqlite":

				$query = $db->query("
SELECT d.*, u.username, t.subject AS tsubject, f.name AS fname
FROM ".TABLE_PREFIX."delayedmoderation d
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=d.tids)

				$query = $db->query("
SELECT d.*, u.username, t.subject AS tsubject, f.name AS fname
FROM ".TABLE_PREFIX."delayedmoderation d
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=d.tids)

					LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid)
WHERE ','||d.tids||',' LIKE '%,{$tid},%'

					LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid)
WHERE ','||d.tids||',' LIKE '%,{$tid},%'

					ORDER BY d.dateline DESC

					ORDER BY d.dateline DESC

					LIMIT  0, 20
");
break;

					LIMIT  0, 20
");
break;

Zeile 1058Zeile 1061
		}
while($delayedmod = $db->fetch_array($query))
{

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

			$delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['dateline']+($delayedmod['delay']*24*60*60));

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

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

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

Zeile 1107Zeile 1110

// Update the thread notes!
case "do_threadnotes":


// Update the thread notes!
case "do_threadnotes":


// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);



// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


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

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

Zeile 1139Zeile 1142
		{
$hostname = $lang->resolve_fail;
}

		{
$hostname = $lang->resolve_fail;
}

 

$username = build_profile_link($post['username'], $post['uid']);


// Moderator options
$modoptions = "";


// Moderator options
$modoptions = "";

Zeile 1149Zeile 1154

eval("\$getip = \"".$templates->get("moderation_getip")."\";");
output_page($getip);


eval("\$getip = \"".$templates->get("moderation_getip")."\";");
output_page($getip);

		break;

		break;


// Merge threads
case "merge":
add_breadcrumb($lang->nav_merge);


// Merge threads
case "merge":
add_breadcrumb($lang->nav_merge);

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

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

		{
error_no_permission();
}

		{
error_no_permission();
}

Zeile 1164Zeile 1169
		eval("\$merge = \"".$templates->get("moderation_merge")."\";");
output_page($merge);
break;

		eval("\$merge = \"".$templates->get("moderation_merge")."\";");
output_page($merge);
break;





	// Lets get those threads together baby! (Merge threads)
case "do_merge":

	// Lets get those threads together baby! (Merge threads)
case "do_merge":





		// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

		// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


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


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

		{
error_no_permission();
}

		{
error_no_permission();
}

Zeile 1258Zeile 1263

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



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


		moderation_redirect("showthread.php?tid=$tid", $lang->redirect_threadsmerged);

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

		break;

		break;





	// Divorce the posts in this thread (Split!)
case "split":
add_breadcrumb($lang->nav_split);

	// Divorce the posts in this thread (Split!)
case "split":
add_breadcrumb($lang->nav_split);

Zeile 1277Zeile 1282
		");
$numposts = $db->num_rows($query);
if($numposts <= "1")

		");
$numposts = $db->num_rows($query);
if($numposts <= "1")

		{

		{

			error($lang->error_cantsplitonepost);
}

$altbg = "trow1";
$posts = '';

			error($lang->error_cantsplitonepost);
}

$altbg = "trow1";
$posts = '';

		while($post = $db->fetch_array($query))
{
$postdate = my_date($mybb->settings['dateformat'], $post['dateline']);
$posttime = my_date($mybb->settings['timeformat'], $post['dateline']);
$parser_options = array(
"allow_html" => $forum['allowhtml'],
"allow_mycode" => $forum['allowmycode'],
"allow_smilies" => $forum['allowsmilies'],
"allow_imgcode" => $forum['allowimgcode'],
"allow_videocode" => $forum['allowvideocode'],
"filter_badwords" => 1
);
if($post['smilieoff'] == 1)
{
$parser_options['allow_smilies'] = 0;
}


		while($post = $db->fetch_array($query))
{
$postdate = my_date($mybb->settings['dateformat'], $post['dateline']);
$posttime = my_date($mybb->settings['timeformat'], $post['dateline']);
$parser_options = array(
"allow_html" => $forum['allowhtml'],
"allow_mycode" => $forum['allowmycode'],
"allow_smilies" => $forum['allowsmilies'],
"allow_imgcode" => $forum['allowimgcode'],
"allow_videocode" => $forum['allowvideocode'],
"filter_badwords" => 1
);
if($post['smilieoff'] == 1)
{
$parser_options['allow_smilies'] = 0;
}


			$message = $parser->parse_message($post['message'], $parser_options);
eval("\$posts .= \"".$templates->get("moderation_split_post")."\";");
$altbg = alt_trow();
}
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");

			$message = $parser->parse_message($post['message'], $parser_options);
eval("\$posts .= \"".$templates->get("moderation_split_post")."\";");
$altbg = alt_trow();
}
$forumselect = build_forum_jump("", $fid, 1, '', 0, true, '', "moveto");





		$plugins->run_hooks("moderation_split");

eval("\$split = \"".$templates->get("moderation_split")."\";");

		$plugins->run_hooks("moderation_split");

eval("\$split = \"".$templates->get("moderation_split")."\";");

Zeile 1349Zeile 1354
		else
{
$moveto = $fid;

		else
{
$moveto = $fid;

		}
$query = $db->simple_select("forums", "fid", "fid='$moveto'", array('limit' => 1));
if($db->num_rows($query) == 0)


		}

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

		{
error($lang->error_invalidforum);
}

		{
error($lang->error_invalidforum);
}

Zeile 1393Zeile 1399
	// Delete Threads - Inline moderation
case "multideletethreads":
add_breadcrumb($lang->nav_multi_deletethreads);

	// Delete Threads - Inline moderation
case "multideletethreads":
add_breadcrumb($lang->nav_multi_deletethreads);

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

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

		{
// From search page
$threads = getids($mybb->input['searchid'], 'search');

		{
// From search page
$threads = getids($mybb->input['searchid'], 'search');

Zeile 1437Zeile 1443
		verify_post_check($mybb->input['my_post_key']);

$threadlist = explode("|", $mybb->input['threads']);

		verify_post_check($mybb->input['my_post_key']);

$threadlist = explode("|", $mybb->input['threads']);

		if(!is_moderator_by_tids($threadlist, "candeleteposts"))
{

		if(!is_moderator_by_tids($threadlist, "candeleteposts"))
{

			error_no_permission();
}
foreach($threadlist as $tid)

			error_no_permission();
}
foreach($threadlist as $tid)

Zeile 1449Zeile 1455
		}
log_moderator_action($modlogdata, $lang->multi_deleted_threads);
if($mybb->input['inlinetype'] == 'search')

		}
log_moderator_action($modlogdata, $lang->multi_deleted_threads);
if($mybb->input['inlinetype'] == 'search')

		{

		{

			clearinline($mybb->input['searchid'], 'search');

			clearinline($mybb->input['searchid'], 'search');

		}
else

		}
else

		{
clearinline($fid, 'forum');

		{
clearinline($fid, 'forum');

		}

		}

		mark_reports($tlist, "threads");
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsdeleted);
break;

// Open threads - Inline moderation

		mark_reports($tlist, "threads");
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsdeleted);
break;

// Open threads - Inline moderation

	case "multiopenthreads":

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

if(!empty($mybb->input['searchid']))
{
// From search page
$threads = getids($mybb->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);
}


	case "multiopenthreads":

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

if(!empty($mybb->input['searchid']))
{
// From search page
$threads = getids($mybb->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);
}


		$moderation->open_threads($threads);

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

		$moderation->open_threads($threads);

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

Zeile 1504Zeile 1510
		break;

// Close threads - Inline moderation

		break;

// Close threads - Inline moderation

	case "multiclosethreads":

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

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

	case "multiclosethreads":

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

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

			if(!is_moderator_by_tids($threads, 'canmanagethreads'))

			if(!is_moderator_by_tids($threads, 'canmanagethreads'))

			{
error_no_permission();

			{
error_no_permission();

			}
}
else

			}
}
else

Zeile 1530Zeile 1536
		{
error($lang->error_inline_nothreadsselected);
}

		{
error($lang->error_inline_nothreadsselected);
}





		$moderation->close_threads($threads);

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

		$moderation->close_threads($threads);

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

		if($mybb->input['inlinetype'] == 'search')
{

		if($mybb->input['inlinetype'] == 'search')
{

			clearinline($mybb->input['searchid'], 'search');
}
else

			clearinline($mybb->input['searchid'], 'search');
}
else

		{

		{

			clearinline($fid, 'forum');

			clearinline($fid, 'forum');

		}

		}

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

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





	// Approve threads - Inline moderation

	// Approve threads - Inline moderation

	case "multiapprovethreads":

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

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

	case "multiapprovethreads":

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

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

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

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

Zeile 1576Zeile 1582
		$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->input['inlinetype'] == 'search')
{
clearinline($mybb->input['searchid'], 'search');
}
else
{
clearinline($fid, 'forum');

		if($mybb->input['inlinetype'] == 'search')
{
clearinline($mybb->input['searchid'], 'search');
}
else
{
clearinline($fid, 'forum');

		}
$cache->update_stats();
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved);

		}
$cache->update_stats();
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved);

Zeile 1599Zeile 1605
			// From search page
$threads = getids($mybb->input['searchid'], 'search');
if(!is_moderator_by_tids($threads, 'canmanagethreads'))

			// From search page
$threads = getids($mybb->input['searchid'], 'search');
if(!is_moderator_by_tids($threads, 'canmanagethreads'))

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

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

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

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

Zeile 1614Zeile 1620
		if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected);

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

		}

		}


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

log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
if($mybb->input['inlinetype'] == 'search')


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

log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
if($mybb->input['inlinetype'] == 'search')

		{

		{

			clearinline($mybb->input['searchid'], 'search');
}
else

			clearinline($mybb->input['searchid'], 'search');
}
else

Zeile 1629Zeile 1635
		}
$cache->update_stats();
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunapproved);

		}
$cache->update_stats();
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsunapproved);

		break;

		break;


// Stick threads - Inline moderation
case "multistickthreads":


// Stick threads - Inline moderation
case "multistickthreads":

Zeile 1674Zeile 1680
		break;

// Unstick threads - Inline moderaton

		break;

// Unstick threads - Inline moderaton

	case "multiunstickthreads":


	case "multiunstickthreads":


		// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

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

		// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

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

		{

		{

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

			// From search page
$threads = getids($mybb->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)

		}
else









		{

		{

			error($lang->error_inline_nothreadsselected);
}









			$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canopenclosethreads'))
{
error_no_permission();
}
}
if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected);
}


$moderation->unstick_threads($threads);



$moderation->unstick_threads($threads);


Zeile 1742Zeile 1748
			error($lang->error_inline_nothreadsselected);
}
$inlineids = implode("|", $threads);

			error($lang->error_inline_nothreadsselected);
}
$inlineids = implode("|", $threads);

		if($mybb->input['inlinetype'] == 'search')
{
clearinline($mybb->input['searchid'], 'search');
}
else

		if($mybb->input['inlinetype'] == 'search')
{
clearinline($mybb->input['searchid'], 'search');
}
else

		{
clearinline($fid, 'forum');

		{
clearinline($fid, 'forum');

		}

		}

		$forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto");
$return_url = htmlspecialchars_uni($mybb->input['url']);
eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";");
output_page($movethread);
break;

		$forumselect = build_forum_jump("", '', 1, '', 0, true, '', "moveto");
$return_url = htmlspecialchars_uni($mybb->input['url']);
eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";");
output_page($movethread);
break;





	// Actually move the threads in Inline moderation
case "do_multimovethreads":

	// Actually move the threads in Inline moderation
case "do_multimovethreads":





		// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


		// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


Zeile 1769Zeile 1775
			error_no_permission();
}
foreach($threadlist as $tid)

			error_no_permission();
}
foreach($threadlist as $tid)

		{

		{

			$tids[] = intval($tid);
}
// Make sure moderator has permission to move to the new forum

			$tids[] = intval($tid);
}
// Make sure moderator has permission to move to the new forum

Zeile 1780Zeile 1786
		}

$newforum = get_forum($moveto);

		}

$newforum = get_forum($moveto);

		if($newforum['type'] != "f")

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

		{
error($lang->error_invalidforum);
}

		{
error($lang->error_invalidforum);
}

Zeile 1817Zeile 1823
		if($mybb->input['inlinetype'] == 'search')
{
clearinline($mybb->input['searchid'], 'search');

		if($mybb->input['inlinetype'] == 'search')
{
clearinline($mybb->input['searchid'], 'search');

		}

		}

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

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

Zeile 1864Zeile 1870
		
// If we have multiple threads, we must be coming from the search
if(!empty($tids))

		
// If we have multiple threads, we must be coming from the search
if(!empty($tids))

		{

		{

			foreach($tids as $tid)
{
$moderation->delete_thread($tid);

			foreach($tids as $tid)
{
$moderation->delete_thread($tid);

Zeile 2127Zeile 2133
		{
$moveto = $fid;
}

		{
$moveto = $fid;
}

		$query = $db->simple_select("forums", "COUNT(fid) as count", "fid='$moveto'");
if($db->fetch_field($query, 'count') == 0)



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

		{
error($lang->error_invalidforum);
}

		{
error($lang->error_invalidforum);
}

		$newsubject = $mybb->input['newsubject'];

 




 
		$newsubject = $mybb->input['newsubject'];

		$newtid = $moderation->split_posts($plist, $tid, $moveto, $newsubject);

$pid_list = implode(', ', $plist);

		$newtid = $moderation->split_posts($plist, $tid, $moveto, $newsubject);

$pid_list = implode(', ', $plist);

Zeile 2146Zeile 2153
	// Approve posts - Inline moderation
case "multiapproveposts":


	// Approve posts - Inline moderation
case "multiapproveposts":


		// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

if($mybb->input['inlinetype'] == 'search')
{
$posts = getids($mybb->input['searchid'], 'search');
}
else
{
$posts = getids($tid, 'thread');
}
if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected);
}

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

$pids = array();
foreach($posts as $pid)
{
$pids[] = intval($pid);
}


		// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

if($mybb->input['inlinetype'] == 'search')
{
$posts = getids($mybb->input['searchid'], 'search');
}
else
{
$posts = getids($tid, 'thread');
}
if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected);
}

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

$pids = array();
foreach($posts as $pid)
{
$pids[] = intval($pid);
}


		$moderation->approve_posts($pids);

log_moderator_action($modlogdata, $lang->multi_approve_posts);
if($mybb->input['inlinetype'] == 'search')

		$moderation->approve_posts($pids);

log_moderator_action($modlogdata, $lang->multi_approve_posts);
if($mybb->input['inlinetype'] == 'search')

		{

		{

			clearinline($mybb->input['searchid'], 'search');

			clearinline($mybb->input['searchid'], 'search');

		}

		}

		else
{
clearinline($tid, 'thread');
}
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved);

		else
{
clearinline($tid, 'thread');
}
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_inline_postsapproved);

		break;

		break;


// Unapprove posts - Inline moderation
case "multiunapproveposts":


// Unapprove posts - Inline moderation
case "multiunapproveposts":

Zeile 2213Zeile 2220
			error_no_permission();
}
foreach($posts as $pid)

			error_no_permission();
}
foreach($posts as $pid)

		{

		{

			$pids[] = intval($pid);
}


			$pids[] = intval($pid);
}


Zeile 2240Zeile 2247
			verify_post_check($mybb->input['my_post_key']);

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

			verify_post_check($mybb->input['my_post_key']);

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

			{
if($mybb->input['inlinetype'] == 'search')

			{
if($mybb->input['inlinetype'] == 'search')

				{
$tids = getids($mybb->input['searchid'], 'search');

				{
$tids = getids($mybb->input['searchid'], 'search');

				}

				}

				else
{
$tids = getids($fid, "forum");
}
if(count($tids) < 1)

				else
{
$tids = getids($fid, "forum");
}
if(count($tids) < 1)

				{

				{

					error($lang->error_inline_nopostsselected);
}
if(!is_moderator_by_tids($tids))
{
error_no_permission();

					error($lang->error_inline_nopostsselected);
}
if(!is_moderator_by_tids($tids))
{
error_no_permission();

				}

				}


$thread_options = unserialize($tool['threadoptions']);
if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f")


$thread_options = unserialize($tool['threadoptions']);
if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f")

Zeile 2265Zeile 2272
				}

$custommod->execute(intval($mybb->input['action']), $tids);

				}

$custommod->execute(intval($mybb->input['action']), $tids);

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

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

				log_moderator_action($modlogdata, $lang->custom_tool);
if($mybb->input['inlinetype'] == 'search')
{

				log_moderator_action($modlogdata, $lang->custom_tool);
if($mybb->input['inlinetype'] == 'search')
{

Zeile 2279Zeile 2286
					clearinline($fid, "forum");
$lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']);
redirect(get_forum_link($fid), $lang->redirect_customtool_forum);

					clearinline($fid, "forum");
$lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']);
redirect(get_forum_link($fid), $lang->redirect_customtool_forum);

				}

				}

				break;
}
elseif($tool['type'] == 't' && $mybb->input['modtype'] == 'thread')
{
if(!is_moderator_by_tids($tid))

				break;
}
elseif($tool['type'] == 't' && $mybb->input['modtype'] == 'thread')
{
if(!is_moderator_by_tids($tid))

				{
error_no_permission();
}


				{
error_no_permission();
}


				$thread_options = unserialize($tool['threadoptions']);
if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f")

				$thread_options = unserialize($tool['threadoptions']);
if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f")

				{

				{

					error($lang->error_movetocategory);
}


					error($lang->error_movetocategory);
}


Zeile 2311Zeile 2318
				break;
}
elseif($tool['type'] == 'p' && $mybb->input['modtype'] == 'inlinepost')

				break;
}
elseif($tool['type'] == 'p' && $mybb->input['modtype'] == 'inlinepost')

			{
if($mybb->input['inlinetype'] == 'search')

			{
if($mybb->input['inlinetype'] == 'search')

				{
$pids = getids($mybb->input['searchid'], 'search');
}

				{
$pids = getids($mybb->input['searchid'], 'search');
}

Zeile 2382Zeile 2389
	$newids = array();	
$cookie = "inlinemod_".$type.$id;
$cookie_ids = explode("|", $mybb->cookies[$cookie]);

	$newids = array();	
$cookie = "inlinemod_".$type.$id;
$cookie_ids = explode("|", $mybb->cookies[$cookie]);

	

	

	foreach($cookie_ids as $cookie_id)
{
if(empty($cookie_id))

	foreach($cookie_ids as $cookie_id)
{
if(empty($cookie_id))

Zeile 2408Zeile 2415
	global $db, $mybb;

$ids = array();

	global $db, $mybb;

$ids = array();

	















// Get any removed threads (after our user hit 'all')
$removed_ids = array();
$cookie = "inlinemod_".$type.$id."_removed";
if($mybb->cookies[$cookie])
{
$removed_ids = explode("|", $mybb->cookies[$cookie]);

if(!is_array($removed_ids))
{
$removed_ids = array();
}
}


	// "Select all Threads in this forum" only supported by forumdisplay and search
if($type == 'forum')
{
$query = $db->simple_select("threads", "tid", "fid='".intval($id)."'");
while($tid = $db->fetch_field($query, "tid"))
{

	// "Select all Threads in this forum" only supported by forumdisplay and search
if($type == 'forum')
{
$query = $db->simple_select("threads", "tid", "fid='".intval($id)."'");
while($tid = $db->fetch_field($query, "tid"))
{

 
			if(in_array($tid, $removed_ids))
{
continue;
}


			$ids[] = $tid;
}
}

			$ids[] = $tid;
}
}

Zeile 2423Zeile 2448
		$query = $db->simple_select("searchlog", "*", "sid='".$db->escape_string($id)."' AND uid='{$mybb->user['uid']}'", 1);
$searchlog = $db->fetch_array($query);
if($searchlog['resulttype'] == 'posts')

		$query = $db->simple_select("searchlog", "*", "sid='".$db->escape_string($id)."' AND uid='{$mybb->user['uid']}'", 1);
$searchlog = $db->fetch_array($query);
if($searchlog['resulttype'] == 'posts')

		{

		{

			$ids = explode(',', $searchlog['posts']);
}
else
{
$ids = explode(',', $searchlog['threads']);

			$ids = explode(',', $searchlog['posts']);
}
else
{
$ids = explode(',', $searchlog['threads']);

 
		}

if(is_array($ids))
{
foreach($ids as $key => $tid)
{
if(in_array($tid, $removed_ids))
{
unset($ids[$key]);
}
}

		}
}


		}
}


Zeile 2438Zeile 2474
function clearinline($id, $type)
{
my_unsetcookie("inlinemod_".$type.$id);

function clearinline($id, $type)
{
my_unsetcookie("inlinemod_".$type.$id);

 
	my_unsetcookie("inlinemod_".$type.$id."_removed");

}

function extendinline($id, $type)

}

function extendinline($id, $type)

Zeile 2445Zeile 2482
	global $mybb;

my_setcookie("inlinemod_$type$id", '', TIME_NOW+3600);

	global $mybb;

my_setcookie("inlinemod_$type$id", '', TIME_NOW+3600);

 
	my_setcookie("inlinemod_$type$id_removed", '', TIME_NOW+3600);

}

/**

}

/**