Vergleich moderation.php - 1.8.10 - 1.8.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 19Zeile 19
$templatelist .= ",moderation_delayedmodaction_notes_thread_single,moderation_delayedmodaction_notes_thread_multiple,moderation_delayedmodaction_notes_forum,moderation_delayedmodaction_notes_new_forum";
$templatelist .= ",moderation_delayedmodaction_notes_redirect,moderation_delayedmodaction_notes_merge,moderation_delayedmoderation_thread,moderation_threadnotes_modaction_thread,forumjump_bit";
$templatelist .= ",moderation_delayedmoderation_date_day,moderation_delayedmoderation_date_month,moderation_threadnotes_modaction_post,moderation_merge,moderation_split,moderation_threadnotes_modaction_forum";

$templatelist .= ",moderation_delayedmodaction_notes_thread_single,moderation_delayedmodaction_notes_thread_multiple,moderation_delayedmodaction_notes_forum,moderation_delayedmodaction_notes_new_forum";
$templatelist .= ",moderation_delayedmodaction_notes_redirect,moderation_delayedmodaction_notes_merge,moderation_delayedmoderation_thread,moderation_threadnotes_modaction_thread,forumjump_bit";
$templatelist .= ",moderation_delayedmoderation_date_day,moderation_delayedmoderation_date_month,moderation_threadnotes_modaction_post,moderation_merge,moderation_split,moderation_threadnotes_modaction_forum";

 
$templatelist .= ",moderation_delayedmoderation_openclose,moderation_delayedmoderation_softdeleterestore,moderation_delayedmoderation_delete,moderation_delayedmoderation_stick,moderation_delayedmoderation_approve";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";

Zeile 106Zeile 107
{
// 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']);

 
}

$log_multithreads_actions = array("do_multideletethreads", "multiclosethreads", "multiopenthreads", "multiapprovethreads", "multiunapprovethreads", "multirestorethreads", "multisoftdeletethreads","multistickthreads", "multiunstickthreads", "do_multimovethreads");
if(in_array($mybb->input['action'], $log_multithreads_actions))
{
if(!empty($mybb->input['searchid']))
{
$tids = getids($mybb->get_input('searchid'), 'search');
}
else
{
$tids = getids($fid, 'forum');
}

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

unset($tids);

}

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

}

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

Zeile 180Zeile 198
			if(count($tids) < 1)
{
error($lang->error_inline_nothreadsselected);

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

			}


			}


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

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

		}

add_breadcrumb($lang->delayed_moderation);

		}

add_breadcrumb($lang->delayed_moderation);


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


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

Zeile 195Zeile 213
		$errors = array();
$customthreadtools = "";


		$errors = array();
$customthreadtools = "";


		$allowed_types = array('openclosethread', 'softdeleterestorethread', 'deletethread', 'move', 'stick', 'merge', 'removeredirects', 'removesubscriptions', 'approveunapprovethread');

		$allowed_types = array('move', 'merge', 'removeredirects', 'removesubscriptions');





		$mybb->input['type'] = $mybb->get_input('type');
























		if(is_moderator($fid, "canopenclosethreads"))
{
$allowed_types[] = "openclosethread";
}

if(is_moderator($fid, "cansoftdeletethreads") || is_moderator($fid, "canrestorethreads"))
{
$allowed_types[] = "softdeleterestorethread";
}

if(is_moderator($fid, "candeletethreads"))
{
$allowed_types[] = "deletethread";
}

if(is_moderator($fid, "canstickunstickthreads"))
{
$allowed_types[] = "stick";
}

if(is_moderator($fid, "canapproveunapprovethreads"))
{
$allowed_types[] = "approveunapprovethread";
}





		switch($db->type)



		$mybb->input['type'] = $mybb->get_input('type');

if(is_moderator($fid, "canusecustomtools"))

		{

		{

			case "pgsql":
case "sqlite":
$query = $db->simple_select("modtools", 'tid, name', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
break;
default:
$query = $db->simple_select("modtools", 'tid, name', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'");
}
while($tool = $db->fetch_array($query))
{
$allowed_types[] = "modtool_".$tool['tid'];

$tool['name'] = htmlspecialchars_uni($tool['name']);

$checked = "";
if($mybb->input['type'] == "modtool_".$tool['tid'])

			switch($db->type)
{
case "pgsql":
case "sqlite":
$query = $db->simple_select("modtools", 'tid, name, groups', "(','||forums||',' LIKE '%,$fid,%' OR ','||forums||',' LIKE '%,-1,%' OR forums='') AND type = 't'");
break;
default:
$query = $db->simple_select("modtools", 'tid, name, groups', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND type = 't'");
}
while($tool = $db->fetch_array($query))






			{

			{

				$checked = "checked=\"checked\"";
}










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

$tool['name'] = htmlspecialchars_uni($tool['name']);

$checked = "";
if($mybb->input['type'] == "modtool_".$tool['tid'])
{
$checked = "checked=\"checked\"";
}





			eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";");



					eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";");
}
}

		}

$mybb->input['delayedmoderation'] = $mybb->get_input('delayedmoderation', MyBB::INPUT_ARRAY);

		}

$mybb->input['delayedmoderation'] = $mybb->get_input('delayedmoderation', MyBB::INPUT_ARRAY);

Zeile 261Zeile 310
			if($mybb->input['date_year'] < gmdate('Y', TIME_NOW + $localized_time_offset))
{
$errors[] = $lang->error_delayedmoderation_invalid_date_year;

			if($mybb->input['date_year'] < gmdate('Y', TIME_NOW + $localized_time_offset))
{
$errors[] = $lang->error_delayedmoderation_invalid_date_year;

			}


			}


			$date_time = explode(' ', $mybb->get_input('date_time'));
$date_time = explode(':', (string)$date_time[0]);

if(stristr($mybb->input['date_time'], 'pm'))

			$date_time = explode(' ', $mybb->get_input('date_time'));
$date_time = explode(':', (string)$date_time[0]);

if(stristr($mybb->input['date_time'], 'pm'))

			{

			{

				$date_time[0] = 12+$date_time[0];
if($date_time[0] >= 24)
{
$date_time[0] = '00';

				$date_time[0] = 12+$date_time[0];
if($date_time[0] >= 24)
{
$date_time[0] = '00';

				}

				}

			}

$rundate = gmmktime((int)$date_time[0], (int)$date_time[1], date('s', TIME_NOW), $mybb->get_input('date_month', MyBB::INPUT_INT), $mybb->get_input('date_day', MyBB::INPUT_INT), $mybb->get_input('date_year', MyBB::INPUT_INT)) - $localized_time_offset;

			}

$rundate = gmmktime((int)$date_time[0], (int)$date_time[1], date('s', TIME_NOW), $mybb->get_input('date_month', MyBB::INPUT_INT), $mybb->get_input('date_day', MyBB::INPUT_INT), $mybb->get_input('date_year', MyBB::INPUT_INT)) - $localized_time_offset;





			if(!$errors)
{
if(is_array($mybb->input['tids']))
{

			if(!$errors)
{
if(is_array($mybb->input['tids']))
{

					$mybb->input['tids'] = implode(',' , $mybb->input['tids']);

					$mybb->input['tids'] = implode(',', $mybb->input['tids']);

				}

$did = $db->insert_query("delayedmoderation", array(

				}

$did = $db->insert_query("delayedmoderation", array(

Zeile 300Zeile 349
				$lang->redirect_delayed_moderation_thread = $lang->sprintf($lang->redirect_delayed_moderation_thread, $rundate_format);

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

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

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

Zeile 403Zeile 452
		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
{
$tids = getids($fid, "forum");
}
$where_array = array();
switch($db->type)

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






			{

			{

				case "pgsql":
case "sqlite":






				$tids = getids($fid, "forum");
}
$where_array = array();
switch($db->type)
{
case "pgsql":
case "sqlite":

					foreach($tids as $like)
{
$where_array[] = "','||d.tids||',' LIKE '%,".$db->escape_string($like).",%'";

					foreach($tids as $like)
{
$where_array[] = "','||d.tids||',' LIKE '%,".$db->escape_string($like).",%'";

					}
$where_statement = implode(" OR ", $where_array);

					}
$where_statement = implode(" OR ", $where_array);

					break;
default:
foreach($tids as $like)

					break;
default:
foreach($tids as $like)

Zeile 445Zeile 494
			{
case "pgsql":
case "sqlite":

			{
case "pgsql":
case "sqlite":

					$query = $db->query("
SELECT d.*, u.username, f.name AS fname
FROM ".TABLE_PREFIX."delayedmoderation d

					$query = $db->query("
SELECT d.*, u.username, f.name AS fname
FROM ".TABLE_PREFIX."delayedmoderation d

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

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

Zeile 520Zeile 569
				$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")."\";");

			}


			}


			eval("\$delayedmods .= \"".$templates->get("moderation_delayedmodaction_notes")."\";");
$trow = alt_trow();
}

			eval("\$delayedmods .= \"".$templates->get("moderation_delayedmodaction_notes")."\";");
$trow = alt_trow();
}

Zeile 588Zeile 637

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


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

 

$openclosethread = '';
if(is_moderator($fid, "canopenclosethreads"))
{
eval('$openclosethread = "'.$templates->get('moderation_delayedmoderation_openclose').'";');
}

$softdeleterestorethread = '';
if(is_moderator($fid, "cansoftdeletethreads") || is_moderator($fid, "canrestorethreads"))
{
eval('$softdeleterestorethread = "'.$templates->get('moderation_delayedmoderation_softdeleterestore').'";');
}

$deletethread = '';
if(is_moderator($fid, "candeletethreads"))
{
eval('$deletethread = "'.$templates->get('moderation_delayedmoderation_delete').'";');
}

$stickunstickthread = '';
if(is_moderator($fid, "canstickunstickthreads"))
{
eval('$stickunstickthread = "'.$templates->get('moderation_delayedmoderation_stick').'";');
}

$approveunapprovethread = '';
if(is_moderator($fid, "canapproveunapprovethreads"))
{
eval('$approveunapprovethread = "'.$templates->get('moderation_delayedmoderation_approve').'";');
}


$plugins->run_hooks("moderation_delayedmoderation");



$plugins->run_hooks("moderation_delayedmoderation");


Zeile 630Zeile 709
		verify_post_check($mybb->get_input('my_post_key'));

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

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

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

		{
error_no_permission();
}

		{
error_no_permission();
}


$plugins->run_hooks("moderation_stick");



$plugins->run_hooks("moderation_stick");


Zeile 701Zeile 780
		verify_post_check($mybb->get_input('my_post_key'));

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

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

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

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

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

		}

$plugins->run_hooks("moderation_do_deletethread");

		}

$plugins->run_hooks("moderation_do_deletethread");

Zeile 1398Zeile 1477
			eval("\$posts .= \"".$templates->get("moderation_split_post")."\";");
$altbg = alt_trow();
}

			eval("\$posts .= \"".$templates->get("moderation_split_post")."\";");
$altbg = alt_trow();
}

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




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


$plugins->run_hooks("moderation_split");


$plugins->run_hooks("moderation_split");





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

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





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

$plugins->run_hooks("moderation_do_split");


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

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

$plugins->run_hooks("moderation_do_split");


$mybb->input['splitpost'] = $mybb->get_input('splitpost', MyBB::INPUT_ARRAY);
if(empty($mybb->input['splitpost']))


$mybb->input['splitpost'] = $mybb->get_input('splitpost', MyBB::INPUT_ARRAY);
if(empty($mybb->input['splitpost']))

		{

		{

			error($lang->error_nosplitposts);

			error($lang->error_nosplitposts);

		}

		}

		$query = $db->simple_select("posts", "COUNT(*) AS totalposts", "tid='{$tid}'");
$count = $db->fetch_array($query);

		$query = $db->simple_select("posts", "COUNT(*) AS totalposts", "tid='{$tid}'");
$count = $db->fetch_array($query);





		if($count['totalposts'] == 1)

		if($count['totalposts'] == 1)

		{

		{

			error($lang->error_cantsplitonepost);

			error($lang->error_cantsplitonepost);

		}


		}


		if($count['totalposts'] == count($mybb->input['splitpost']))
{
error($lang->error_cantsplitall);
}

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

		if($count['totalposts'] == count($mybb->input['splitpost']))
{
error($lang->error_cantsplitall);
}

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'] != '')

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

		{

		{

			error($lang->error_invalidforum);
}

			error($lang->error_invalidforum);
}





		$pids = array();

// move the selected posts over

		$pids = array();

// move the selected posts over

Zeile 1459Zeile 1540
		while($post = $db->fetch_array($query))
{
if(isset($mybb->input['splitpost'][$post['pid']]) && $mybb->input['splitpost'][$post['pid']] == 1)

		while($post = $db->fetch_array($query))
{
if(isset($mybb->input['splitpost'][$post['pid']]) && $mybb->input['splitpost'][$post['pid']] == 1)

			{

			{

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

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

Zeile 1467Zeile 1548

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



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


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


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


		moderation_redirect(get_thread_link($newtid), $lang->redirect_threadsplit);
break;

		moderation_redirect(get_thread_link($newtid), $lang->redirect_threadsplit);
break;





	// Delete Thread Subscriptions
case "removesubscriptions":


	// Delete Thread Subscriptions
case "removesubscriptions":


Zeile 1479Zeile 1560
        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();

		{
error_no_permission();

		}

$plugins->run_hooks("moderation_removesubscriptions");

$moderation->remove_thread_subscriptions($tid, true);

		}

$plugins->run_hooks("moderation_removesubscriptions");

$moderation->remove_thread_subscriptions($tid, true);





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

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





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

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





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

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

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

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

			{
error_no_permission();
}

			{
error_no_permission();
}

		}
else
{

		}
else
{

Zeile 1512Zeile 1593
			{
error_no_permission();
}

			{
error_no_permission();
}

		}

		}

		if(count($threads) < 1)

		if(count($threads) < 1)

		{

		{

			error($lang->error_inline_nothreadsselected);

			error($lang->error_inline_nothreadsselected);

		}

		}


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


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

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

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

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

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

Zeile 1564Zeile 1645

// Open threads - Inline moderation
case "multiopenthreads":


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

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



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


		$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($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');
}
else

Zeile 1604Zeile 1685
		}
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsopened);
break;

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





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


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


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

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

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

			{
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->close_threads($threads);



$moderation->close_threads($threads);


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

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

		}

		}

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

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

		}

		}

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

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





	// Approve threads - Inline moderation

	// Approve threads - Inline moderation

	case "multiapprovethreads":

// 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, 'canapproveunapprovethreads'))
{
error_no_permission();
}
}
else
{
$threads = getids($fid, 'forum');

	case "multiapprovethreads":

// 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, 'canapproveunapprovethreads'))
{
error_no_permission();
}
}
else
{
$threads = getids($fid, 'forum');

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

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

		}

		}

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

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

		}


		}


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

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

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

		{

		{

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

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

Zeile 1692Zeile 1773

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


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





		// 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 1701Zeile 1782
			// 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();
}
}
else

			{
error_no_permission();
}
}
else

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

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

Zeile 1716Zeile 1797
		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);

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

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

Zeile 1734Zeile 1815
		break;

// Restore threads - Inline moderation

		break;

// Restore threads - Inline moderation

	case "multirestorethreads":

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


	case "multirestorethreads":

// 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, 'canrestorethreads'))

		if(!empty($mybb->input['searchid']))
{
// 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 1757Zeile 1838
			}
}
if(count($threads) < 1)

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

		{

		{

			error($lang->error_inline_nothreadsselected);
}


			error($lang->error_inline_nothreadsselected);
}


Zeile 1774Zeile 1855
		}
$cache->update_stats();
moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsrestored);

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

		break;


		break;


	// Soft delete threads - Inline moderation
case "multisoftdeletethreads":

	// Soft delete threads - Inline moderation
case "multisoftdeletethreads":





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

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

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

Zeile 1798Zeile 1879
			{
error_no_permission();
}

			{
error_no_permission();
}

		}

		}

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

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

		}


		}


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

		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 1880Zeile 1961
		{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canstickunstickthreads'))

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

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

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

			error($lang->error_inline_nothreadsselected);
}


			error($lang->error_inline_nothreadsselected);
}


Zeile 2476Zeile 2557

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


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

 

$plugins->run_hooks("moderation_do_multimoveposts");


// explode at # sign in a url (indicates a name reference) and reassign to the url
$realurl = explode("#", $mybb->get_input('threadurl'));


// explode at # sign in a url (indicates a name reference) and reassign to the url
$realurl = explode("#", $mybb->get_input('threadurl'));

Zeile 2805Zeile 2888
		require_once MYBB_ROOT."inc/functions_user.php";

$groups = explode(",", $mybb->settings['purgespammergroups']);

		require_once MYBB_ROOT."inc/functions_user.php";

$groups = explode(",", $mybb->settings['purgespammergroups']);

		if(!in_array($mybb->user['usergroup'], $groups))

		if(!is_member($groups))

		{
error_no_permission();
}

		{
error_no_permission();
}