Vergleich report.php - 1.8.16 - 1.8.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 32Zeile 32
if(!empty($mybb->input['type']))
{
$report_type = htmlspecialchars_uni($mybb->get_input('type'));

if(!empty($mybb->input['type']))
{
$report_type = htmlspecialchars_uni($mybb->get_input('type'));

}

if(empty($permissions['canbereported']))
{
$error = $lang->sprintf($lang->error_invalid_report, $report_type);

 
}

$report_title = $lang->report_content;
$report_string = "report_reason_{$report_type}";

}

$report_title = $lang->report_content;
$report_string = "report_reason_{$report_type}";





if(isset($lang->$report_string))
{
$report_title = $lang->$report_string;

if(isset($lang->$report_string))
{
$report_title = $lang->$report_string;

Zeile 49Zeile 44

$id = 0;
if($report_type == 'post')


$id = 0;
if($report_type == 'post')

{

{

	if($mybb->usergroup['canview'] == 0)

	if($mybb->usergroup['canview'] == 0)

	{

	{

		error_no_permission();
}


		error_no_permission();
}


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

if(!$post)

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

if(!$post)

	{

	{

		$error = $lang->sprintf($lang->error_invalid_report, $report_type);
}
else

		$error = $lang->sprintf($lang->error_invalid_report, $report_type);
}
else

Zeile 67Zeile 62
		$id = $post['pid'];
$id2 = $post['tid'];
$report_type_db = "(type = 'post' OR type = '')";

		$id = $post['pid'];
$id2 = $post['tid'];
$report_type_db = "(type = 'post' OR type = '')";




		$checkid = $post['uid'];


		// Check for a valid forum
$forum = get_forum($post['fid']);

		// Check for a valid forum
$forum = get_forum($post['fid']);





		if(!isset($forum['fid']))
{
$error = $lang->sprintf($lang->error_invalid_report, $report_type);

		if(!isset($forum['fid']))
{
$error = $lang->sprintf($lang->error_invalid_report, $report_type);

Zeile 90Zeile 86
	$user = get_user($mybb->get_input('pid', MyBB::INPUT_INT));

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

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

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

	{

	{

		$error = $lang->sprintf($lang->error_invalid_report, $report_type);
}
else
{
$verified = true;
$report_type_db = "type = 'profile'";

		$error = $lang->sprintf($lang->error_invalid_report, $report_type);
}
else
{
$verified = true;
$report_type_db = "type = 'profile'";



 
		$id2 = $id3 = 0; // We don't use these on the profile

		$id2 = $id3 = 0; // We don't use these on the profile

		$id = $user['uid']; // id is the profile user
$permissions = user_permissions($user['uid']);

		$id = $checkid = $user['uid']; // id is the profile user


	}
}
else if($report_type == 'reputation')

	}
}
else if($report_type == 'reputation')

Zeile 116Zeile 110
	{
$verified = true;
$reputation = $db->fetch_array($query);

	{
$verified = true;
$reputation = $db->fetch_array($query);



 
		$id = $reputation['rid']; // id is the reputation id

		$id = $reputation['rid']; // id is the reputation id

		$id2 = $reputation['adduid']; // id2 is the user who gave the comment

		$id2 = $checkid = $reputation['adduid']; // id2 is the user who gave the comment

		$id3 = $reputation['uid']; // id3 is the user who received the comment

		$id3 = $reputation['uid']; // id3 is the user who received the comment



 
		$report_type_db = "type = 'reputation'";
}

		$report_type_db = "type = 'reputation'";
}

 
}

$permissions = user_permissions($checkid);
if(empty($permissions['canbereported']))
{
$error = $lang->sprintf($lang->error_invalid_report, $report_type);

}

$plugins->run_hooks("report_type");

}

$plugins->run_hooks("report_type");