Vergleich report.php - 1.8.13 - 1.8.19

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 55Zeile 55

if(!$post)
{


if(!$post)
{

		$error = $lang->error_invalid_report;

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

if(!isset($forum['fid']))
{


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

if(!isset($forum['fid']))
{

			$error = $lang->error_invalid_report;

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

		}
else
{

		}
else
{

Zeile 86Zeile 87

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


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

		$error = $lang->error_invalid_report;

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

	}
else
{

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

if(empty($permissions['canbereported']))
{
$error = $lang->error_invalid_report;
}
else
{
$verified = true;
$report_type_db = "type = 'profile'";
}
}

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












}
else if($report_type == 'reputation')
{
// Any member can report a reputation comment but let's make sure it exists first
$query = $db->simple_select("reputation", "*", "rid = '".$mybb->get_input('pid', MyBB::INPUT_INT)."'");

}
else if($report_type == 'reputation')
{
// Any member can report a reputation comment but let's make sure it exists first
$query = $db->simple_select("reputation", "*", "rid = '".$mybb->get_input('pid', MyBB::INPUT_INT)."'");





	if(!$db->num_rows($query))

	if(!$db->num_rows($query))

	{
$error = $lang->error_invalid_report;
}

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

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

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

Zeile 184Zeile 180

if(!$db->num_rows($query))
{


if(!$db->num_rows($query))
{

			$error = $lang->error_invalid_report_reason;

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

			$verified = false;
}
else

			$verified = false;
}
else

Zeile 235Zeile 231

if($verified == false && empty($error))
{


if($verified == false && empty($error))
{

		$error = $lang->error_invalid_report;

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

	}
}


	}
}