Vergleich report.php - 1.8.16 - 1.8.36

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

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

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

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

Zeile 78Zeile 74
		else
{
$verified = true;

		else
{
$verified = true;

 
			$button = '#post_'.$id.' .postbit_report';

		}

		}






$id3 = $forum['fid'];


		// Password protected forums ......... yhummmmy!

		// Password protected forums ......... yhummmmy!

		$id3 = $forum['fid'];
check_forum_password($forum['parentlist']);
}

		check_forum_password($forum['fid']);
}


}
else if($report_type == 'profile')
{
$user = get_user($mybb->get_input('pid', MyBB::INPUT_INT));

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

}
else if($report_type == 'profile')
{
$user = get_user($mybb->get_input('pid', MyBB::INPUT_INT));

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

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

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

	else
{
$verified = true;
$report_type_db = "type = 'profile'";

	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
$button = '.report_user_button';

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

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

Zeile 116Zeile 113
	{
$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'";

 
		$button = '#rid'.$id.' .postbit_report';

	}

	}

}


}


$plugins->run_hooks("report_type");

$plugins->run_hooks("report_type");

 

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


// Check for an existing report
if(!empty($report_type_db))


// Check for an existing report
if(!empty($report_type_db))

Zeile 164Zeile 166

eval("\$report_thanks = \"".$templates->get("report_thanks")."\";");
echo $report_thanks;


eval("\$report_thanks = \"".$templates->get("report_thanks")."\";");
echo $report_thanks;

 
		echo sprintf("<script type='text/javascript'>$('%s').remove();</script>", $button);

		exit;
}
else

		exit;
}
else

Zeile 190Zeile 193
			$reason = $db->fetch_array($query);

$new_report['reasonid'] = $reason['rid'];

			$reason = $db->fetch_array($query);

$new_report['reasonid'] = $reason['rid'];

 
			$new_report['reason'] = '';


if($reason['extra'])
{


if($reason['extra'])
{

Zeile 222Zeile 226

eval("\$report_thanks = \"".$templates->get("report_thanks")."\";");
echo $report_thanks;


eval("\$report_thanks = \"".$templates->get("report_thanks")."\";");
echo $report_thanks;

 
			echo sprintf("<script type='text/javascript'>$('%s').remove();</script>", $button);

			exit;
}
}

			exit;
}
}

Zeile 270Zeile 275
		}
}


		}
}


	if($mybb->input['no_modal'])

	if($mybb->get_input('no_modal'))

	{
echo $report_reasons;
exit;

	{
echo $report_reasons;
exit;