Vergleich warnings.php - 1.8.3 - 1.8.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 49Zeile 49
		error_no_permission();
}


		error_no_permission();
}


	$user = get_user($mybb->get_input('uid', 1));

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


if(!$user['uid'])
{


if(!$user['uid'])
{

Zeile 71Zeile 71
	$plugins->run_hooks("warnings_do_warn_start");

$warning = array(

	$plugins->run_hooks("warnings_do_warn_start");

$warning = array(

		'uid' => $mybb->get_input('uid', 1),

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

		'notes' => $mybb->get_input('notes'),
'type' => $mybb->get_input('type'),
'custom_reason' => $mybb->get_input('custom_reason'),

		'notes' => $mybb->get_input('notes'),
'type' => $mybb->get_input('type'),
'custom_reason' => $mybb->get_input('custom_reason'),

		'custom_points' => $mybb->get_input('custom_points', 1),
'expires' => $mybb->get_input('expires', 1),

		'custom_points' => $mybb->get_input('custom_points', MyBB::INPUT_INT),
'expires' => $mybb->get_input('expires', MyBB::INPUT_INT),

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

// Is this warning being given for a post?

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

// Is this warning being given for a post?

	if($mybb->get_input('pid', 1))

	if($mybb->get_input('pid', MyBB::INPUT_INT))

	{

	{

		$warning['pid'] = $mybb->get_input('pid', 1);

		$warning['pid'] = $mybb->get_input('pid', MyBB::INPUT_INT);


$post = get_post($warning['pid']);



$post = get_post($warning['pid']);


Zeile 102Zeile 102
		$warninginfo = $warningshandler->insert_warning();

// Are we notifying the user?

		$warninginfo = $warningshandler->insert_warning();

// Are we notifying the user?

		if($mybb->get_input('send_pm', 1) == 1 && $group_permissions['canusepms'] != 0 && $mybb->settings['enablepms'] != 0)

		if($mybb->get_input('send_pm', MyBB::INPUT_INT) == 1 && $group_permissions['canusepms'] != 0 && $mybb->settings['enablepms'] != 0)

		{

$pm = array(

		{

$pm = array(

Zeile 112Zeile 112
			);

$sender_uid = $mybb->user['uid'];

			);

$sender_uid = $mybb->user['uid'];

			if($mybb->settings['allowanonwarningpms'] == 1 && $mybb->get_input('pm_anonymous', 1))

			if($mybb->settings['allowanonwarningpms'] == 1 && $mybb->get_input('pm_anonymous', MyBB::INPUT_INT))

			{
$sender_uid = -1;
}

			{
$sender_uid = -1;
}

Zeile 165Zeile 165
		}
}


		}
}


	$user = get_user($mybb->get_input('uid', 1));

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

	if(!$user)
{
error($lang->error_invalid_user);

	if(!$user)
{
error($lang->error_invalid_user);

Zeile 196Zeile 196
	$post = $existing_warnings = '';

// Giving a warning for a specific post

	$post = $existing_warnings = '';

// Giving a warning for a specific post

	if($mybb->get_input('pid', 1))

	if($mybb->get_input('pid', MyBB::INPUT_INT))

	{

	{

		$post = get_post($mybb->get_input('pid', 1));

		$post = get_post($mybb->get_input('pid', MyBB::INPUT_INT));


if($post)
{


if($post)
{

Zeile 227Zeile 227
			FROM ".TABLE_PREFIX."warnings w
LEFT JOIN ".TABLE_PREFIX."warningtypes t ON (t.tid=w.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=w.issuedby)

			FROM ".TABLE_PREFIX."warnings w
LEFT JOIN ".TABLE_PREFIX."warningtypes t ON (t.tid=w.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=w.issuedby)

			WHERE w.pid='".$mybb->get_input('pid', 1)."'

			WHERE w.pid='".$mybb->get_input('pid', MyBB::INPUT_INT)."'

			ORDER BY w.expired ASC, w.dateline DESC
");
$first = true;

			ORDER BY w.expired ASC, w.dateline DESC
");
$first = true;

Zeile 307Zeile 307
	if(!empty($warn_errors))
{
$notes = htmlspecialchars_uni($mybb->get_input('notes'));

	if(!empty($warn_errors))
{
$notes = htmlspecialchars_uni($mybb->get_input('notes'));

		if($mybb->get_input('type', 1))

		if($mybb->get_input('type', MyBB::INPUT_INT))

		{

		{

			$type_checked[$mybb->get_input('type', 1)] = "checked=\"checked\"";

			$type_checked[$mybb->get_input('type', MyBB::INPUT_INT)] = "checked=\"checked\"";

		}
$pm_subject = htmlspecialchars_uni($mybb->get_input('pm_subject'));
$message = htmlspecialchars_uni($mybb->get_input('pm_message'));

		}
$pm_subject = htmlspecialchars_uni($mybb->get_input('pm_subject'));
$message = htmlspecialchars_uni($mybb->get_input('pm_message'));

Zeile 318Zeile 318
			$send_pm_checked = "checked=\"checked\"";
}
$custom_reason = htmlspecialchars_uni($mybb->get_input('custom_reason'));

			$send_pm_checked = "checked=\"checked\"";
}
$custom_reason = htmlspecialchars_uni($mybb->get_input('custom_reason'));

		$custom_points = $mybb->get_input('custom_points', 1);
$expires = $mybb->get_input('expires', 1);
if($mybb->get_input('expires_period', 1))

		$custom_points = $mybb->get_input('custom_points', MyBB::INPUT_INT);
$expires = $mybb->get_input('expires', MyBB::INPUT_INT);
if($mybb->get_input('expires_period', MyBB::INPUT_INT))

		{

		{

			$expires_period[$mybb->get_input('expires_period', 1)] = "selected=\"selected\"";

			$expires_period[$mybb->get_input('expires_period', MyBB::INPUT_INT)] = "selected=\"selected\"";

		}
}
else

		}
}
else

Zeile 472Zeile 472
		if($mybb->settings['allowanonwarningpms'] == 1)
{
$checked = '';

		if($mybb->settings['allowanonwarningpms'] == 1)
{
$checked = '';

			if($mybb->get_input('pm_anonymous', 1))

			if($mybb->get_input('pm_anonymous', MyBB::INPUT_INT))

			{
$checked = ' checked="checked"';
}

			{
$checked = ' checked="checked"';
}

Zeile 560Zeile 560
		LEFT JOIN ".TABLE_PREFIX."warningtypes t ON (t.tid=w.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=w.issuedby)
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=w.pid)

		LEFT JOIN ".TABLE_PREFIX."warningtypes t ON (t.tid=w.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=w.issuedby)
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=w.pid)

		WHERE w.wid='".$mybb->get_input('wid', 1)."'

		WHERE w.wid='".$mybb->get_input('wid', MyBB::INPUT_INT)."'

	");
$warning = $db->fetch_array($query);


	");
$warning = $db->fetch_array($query);


Zeile 692Zeile 692
		error_no_permission();
}


		error_no_permission();
}


	$user = get_user($mybb->get_input('uid', 1));

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

	if(!$user['uid'])
{
error($lang->error_invalid_user);

	if(!$user['uid'])
{
error($lang->error_invalid_user);

Zeile 715Zeile 715

// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['postsperpage'];


// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['postsperpage'];

	$page = $mybb->get_input('page', 1);

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


$query = $db->simple_select("warnings", "COUNT(wid) AS warning_count", "uid='{$user['uid']}'");
$warning_count = $db->fetch_field($query, "warning_count");


$query = $db->simple_select("warnings", "COUNT(wid) AS warning_count", "uid='{$user['uid']}'");
$warning_count = $db->fetch_field($query, "warning_count");