Vergleich moderation.php - 1.8.12 - 1.8.14

  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']);
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 123Zeile 141
{
// 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 188Zeile 206
		add_breadcrumb($lang->delayed_moderation);

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

		add_breadcrumb($lang->delayed_moderation);

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

		{

		{

			error_no_permission();

			error_no_permission();

		}


		}


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

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


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


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


switch($db->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'])
{
$checked = "checked=\"checked\"";
}

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







			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))
{
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")."\";");
}
}

		}

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

		}

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

Zeile 272Zeile 321
				if($date_time[0] >= 24)
{
$date_time[0] = '00';

				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 312Zeile 361
					else
{
moderation_redirect(get_forum_link($fid), $lang->sprintf($lang->redirect_delayed_moderation_forum, $rundate_format));

					else
{
moderation_redirect(get_forum_link($fid), $lang->sprintf($lang->redirect_delayed_moderation_forum, $rundate_format));

					}
}
}
else
{

					}
}
}
else
{

				$type_selected = array();
foreach($allowed_types as $type)
{

				$type_selected = array();
foreach($allowed_types as $type)
{

Zeile 416Zeile 465
			{
case "pgsql":
case "sqlite":

			{
case "pgsql":
case "sqlite":

					foreach($tids as $like)

					foreach($tids as $like)

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

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

					}

					}

					$where_statement = implode(" OR ", $where_array);
break;
default:

					$where_statement = implode(" OR ", $where_array);
break;
default:

Zeile 436Zeile 485
				LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid)
WHERE ".$where_statement."
ORDER BY d.dateline DESC

				LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid)
WHERE ".$where_statement."
ORDER BY d.dateline DESC

				LIMIT  0, 20

				LIMIT  0, 20

			");
}
else

			");
}
else

Zeile 476Zeile 525
			$delayedmod['action'] = $actions[$delayedmod['type']];
$info = '';
if(strpos($delayedmod['tids'], ',') === false)

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

			{

			{

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

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

			}

			}

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

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

			}


			}


			if($delayedmod['fname'])
{
$delayedmod['link'] = get_forum_link($delayedmod['fid']);

			if($delayedmod['fname'])
{
$delayedmod['link'] = get_forum_link($delayedmod['fid']);

Zeile 496Zeile 545
			$delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);

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

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

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

			{

			{

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

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

Zeile 504Zeile 553
				if($delayedmod['inputs']['method'] == "redirect")
{
if((int)$delayedmod['inputs']['redirect_expire'] == 0)

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

					{

					{

						$redirect_expire_bit = $lang->redirect_forever;

						$redirect_expire_bit = $lang->redirect_forever;

					}

					}

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

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

Zeile 516Zeile 565
				}
}
else if($delayedmod['type'] == 'merge')

				}
}
else if($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 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 596Zeile 675
		break;
// Open or close a thread
case "openclosethread":

		break;
// Open or close a thread
case "openclosethread":

		// Verify incoming POST request

		// Verify incoming POST request

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

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

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

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

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

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

		}

		}


$plugins->run_hooks('moderation_do_move');



$plugins->run_hooks('moderation_do_move');


Zeile 1235Zeile 1314
		{
$ipaddress = $pm['ipaddress'];
eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");

		{
$ipaddress = $pm['ipaddress'];
eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");

		}

$plugins->run_hooks('moderation_getpmip');

		}

$plugins->run_hooks('moderation_getpmip');


eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";");
output_page($getpmip);


eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";");
output_page($getpmip);

Zeile 1335Zeile 1414
			error($lang->error_mergewithself);
}
if(!is_moderator($mergethread['fid'], "canmanagethreads"))

			error($lang->error_mergewithself);
}
if(!is_moderator($mergethread['fid'], "canmanagethreads"))

		{
error_no_permission();
}

		{
error_no_permission();
}

		if(isset($mybb->input['subject']))
{
$subject = $mybb->get_input('subject');

		if(isset($mybb->input['subject']))
{
$subject = $mybb->get_input('subject');

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

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

 

clearinline($tid, 'thread');

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

$plugins->run_hooks("moderation_split");

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

$plugins->run_hooks("moderation_split");

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