Vergleich moderation.php - 1.6.0 - 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 5138 2010-07-28 18:31:24Z RyanGordon $

 * $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);
}
if($method != "copy" && $thread['fid'] == $moveto)

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

		{

		{

			error($lang->error_movetosameforum);

			error($lang->error_movetosameforum);

		}


		}


		$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;
default:

				break;
default:

			case "move":
case "redirect":
log_moderator_action($modlogdata, $lang->thread_moved);

			case "move":
case "redirect":
log_moderator_action($modlogdata, $lang->thread_moved);

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 991Zeile 994
			if($modaction['psubject'])
{
$info .= "<strong>$lang->post</strong> <a href=\"".get_post_link($modaction['pid'])."#pid".$modaction['pid']."\">".htmlspecialchars_uni($modaction['psubject'])."</a>";

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

			}

			}


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


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

		}

		}

		if(!$modactions)
{
$modactions = "<tr><td class=\"trow1\" colspan=\"4\">$lang->no_mod_options</td></tr>";
}

		if(!$modactions)
{
$modactions = "<tr><td class=\"trow1\" colspan=\"4\">$lang->no_mod_options</td></tr>";
}

		

		

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

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

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

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

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

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

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

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

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)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid)

				$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},%'

					WHERE ','||d.tids||',' LIKE '%,{$tid},%'

					ORDER BY d.dateline DESC
LIMIT 0, 20

					ORDER BY d.dateline DESC
LIMIT 0, 20

				");
break;
default:

				");
break;
default:

Zeile 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 incoming POST request

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

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

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

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

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)

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

			{
$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 1438Zeile 1444

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


$threadlist = explode("|", $mybb->input['threads']);
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();
}
}


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

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

		}

$moderation->open_threads($threads);

		}

$moderation->open_threads($threads);


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


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

		}

		}

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

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

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');
if(!is_moderator_by_tids($threads, 'canmanagethreads'))
{
error_no_permission();
}
}
else
{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canmanagethreads'))
{
error_no_permission();
}
}
if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected);
}


	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'))
{
error_no_permission();
}
}
else
{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canmanagethreads'))
{
error_no_permission();
}
}
if(count($threads) < 1)
{
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);

Zeile 1546Zeile 1552
		break;

// Approve threads - Inline moderation

		break;

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

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

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

			{
error_no_permission();
}
}

			{
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')

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

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

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

		{

		{

			clearinline($fid, 'forum');
}
$cache->update_stats();
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved);
break;

			clearinline($fid, 'forum');
}
$cache->update_stats();
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved);
break;





	// Unapprove threads - Inline moderation
case "multiunapprovethreads":

	// Unapprove threads - Inline moderation
case "multiunapprovethreads":





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

			{
error_no_permission();

			}
}
else

			}
}
else

Zeile 1662Zeile 1668
		$moderation->stick_threads($threads);

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

		$moderation->stick_threads($threads);

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

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

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





	// Unstick threads - Inline moderaton
case "multiunstickthreads":

	// Unstick threads - Inline moderaton
case "multiunstickthreads":





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

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

			{
error_no_permission();

			{
error_no_permission();

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

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

Zeile 1738Zeile 1744
		}

if(count($threads) < 1)

		}

if(count($threads) < 1)

		{
error($lang->error_inline_nothreadsselected);

		{
error($lang->error_inline_nothreadsselected);

		}
$inlineids = implode("|", $threads);
if($mybb->input['inlinetype'] == 'search')

		}
$inlineids = implode("|", $threads);
if($mybb->input['inlinetype'] == 'search')

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 1810Zeile 1816
			error($lang->error_inline_nopostsselected);
}
if(!is_moderator_by_pids($posts, "candeleteposts"))

			error($lang->error_inline_nopostsselected);
}
if(!is_moderator_by_pids($posts, "candeleteposts"))

		{

		{

			error_no_permission();
}
$inlineids = implode("|", $posts);

			error_no_permission();
}
$inlineids = implode("|", $posts);

Zeile 1854Zeile 1860
		}

$deletecount = 0;

		}

$deletecount = 0;

		foreach($postlist as $pid)
{
$pid = intval($pid);

		foreach($postlist as $pid)
{
$pid = intval($pid);

			$moderation->delete_post($pid);
$plist[] = $pid;
$deletecount++;

			$moderation->delete_post($pid);
$plist[] = $pid;
$deletecount++;

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 2257Zeile 2264
				{
error_no_permission();
}

				{
error_no_permission();
}

				








$thread_options = unserialize($tool['threadoptions']);
if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f")
{
error($lang->error_movetocategory);
}


				$custommod->execute(intval($mybb->input['action']), $tids);
$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);

				$custommod->execute(intval($mybb->input['action']), $tids);
$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);

Zeile 2282Zeile 2295
				{
error_no_permission();
}

				{
error_no_permission();
}

 

$thread_options = unserialize($tool['threadoptions']);
if($thread_options['movethread'] && $forum_cache[$thread_options['movethread']]['type'] != "f")
{
error($lang->error_movetocategory);
}


				$ret = $custommod->execute(intval($mybb->input['action']), $tid);
$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);

				$ret = $custommod->execute(intval($mybb->input['action']), $tid);
$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);

Zeile 2294Zeile 2314
				{
$lang->redirect_customtool_thread = $lang->sprintf($lang->redirect_customtool_thread, $tool['name']);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_customtool_thread);

				{
$lang->redirect_customtool_thread = $lang->sprintf($lang->redirect_customtool_thread, $tool['name']);
moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_customtool_thread);

				}
break;
}

				}
break;
}

			elseif($tool['type'] == 'p' && $mybb->input['modtype'] == 'inlinepost')
{
if($mybb->input['inlinetype'] == 'search')

			elseif($tool['type'] == 'p' && $mybb->input['modtype'] == 'inlinepost')
{
if($mybb->input['inlinetype'] == 'search')

Zeile 2304Zeile 2324
					$pids = getids($mybb->input['searchid'], 'search');
}
else

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

				{

				{

					$pids = getids($tid, 'thread');

					$pids = getids($tid, 'thread');

				}

				}

				
if(count($pids) < 1)

				
if(count($pids) < 1)

				{

				{

					error($lang->error_inline_nopostsselected);
}
if(!is_moderator_by_pids($pids))
{
error_no_permission();

					error($lang->error_inline_nopostsselected);
}
if(!is_moderator_by_pids($pids))
{
error_no_permission();

				}


				}


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

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

Zeile 2355Zeile 2375
				}

break;

				}

break;

			}
}

			}
}

		error_no_permission();
break;
}

		error_no_permission();
break;
}

Zeile 2395Zeile 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;

		}

		}

	}
else if($type == 'search')
{
$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')

	}
else if($type == 'search')
{
$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']);

			$ids = explode(',', $searchlog['posts']);

		}

		}

		else

		else

		{

		{

			$ids = explode(',', $searchlog['threads']);

			$ids = explode(',', $searchlog['threads']);

 
		}

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

		}
}


		}
}


Zeile 2425Zeile 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 2432Zeile 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);

}

/**

}

/**