Vergleich report.php - 1.8.7 - 1.8.22

  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
{
$verified = true;

		}
else
{
$verified = true;

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

		}

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

		}

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

Zeile 86Zeile 88

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











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

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

Zeile 111Zeile 105
	$query = $db->simple_select("reputation", "*", "rid = '".$mybb->get_input('pid', MyBB::INPUT_INT)."'");

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

	$query = $db->simple_select("reputation", "*", "rid = '".$mybb->get_input('pid', MyBB::INPUT_INT)."'");

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

	}
}

$plugins->run_hooks("report_type");








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

$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))
{
$query = $db->simple_select("reportedcontent", "*", "reportstatus != '1' AND id = '{$id}' AND {$report_type_db}");


// Check for an existing report
if(!empty($report_type_db))
{
$query = $db->simple_select("reportedcontent", "*", "reportstatus != '1' AND id = '{$id}' AND {$report_type_db}");





	if($db->num_rows($query))
{
// Existing report

	if($db->num_rows($query))
{
// Existing report

Zeile 143Zeile 142
		if($mybb->user['uid'] == $report['uid'] || is_array($report['reporters']) && in_array($mybb->user['uid'], $report['reporters']))
{
$error = $lang->success_report_voted;

		if($mybb->user['uid'] == $report['uid'] || is_array($report['reporters']) && in_array($mybb->user['uid'], $report['reporters']))
{
$error = $lang->success_report_voted;

		}

		}

	}
}

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

	}
}

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





if(empty($error) && $verified == true && $mybb->input['action'] == "do_report" && $mybb->request_method == "post")
{
verify_post_check($mybb->get_input('my_post_key'));

if(empty($error) && $verified == true && $mybb->input['action'] == "do_report" && $mybb->request_method == "post")
{
verify_post_check($mybb->get_input('my_post_key'));





	$plugins->run_hooks("report_do_report_start");

	$plugins->run_hooks("report_do_report_start");





	// Is this an existing report or a new offender?
if(!empty($report))
{

	// Is this an existing report or a new offender?
if(!empty($report))
{

Zeile 166Zeile 165

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

// Figure out the reason

		);

// Figure out the reason

		$reason = trim($mybb->get_input('reason'));


		$rid = $mybb->get_input('reason', MyBB::INPUT_INT);
$query = $db->simple_select("reportreasons", "*", "rid = '{$rid}'");





		if($reason == 'other')

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

		{

		{

			// Replace the reason with the user comment
$reason = trim($mybb->get_input('comment'));

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

		}
else
{

		}
else
{

			$report_reason_string = "report_reason_{$reason}";
$reason = "\n".$lang->$report_reason_string;
}

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







		if(my_strlen($reason) < 3)
{
$error = $lang->error_report_length;





















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

if($reason['extra'])
{
$comment = trim($mybb->get_input('comment'));
if(empty($comment) || $comment == '')
{
$error = $lang->error_comment_required;
$verified = false;
}
else
{
if(my_strlen($comment) < 3)
{
$error = $lang->error_report_length;
$verified = false;
}
else
{
$new_report['reason'] = $comment;
}
}
}

		}

if(empty($error))
{

		}

if(empty($error))
{

			$new_report['reason'] = $reason;

 
			add_report($new_report, $report_type);

$plugins->run_hooks("report_do_report_end");

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

			add_report($new_report, $report_type);

$plugins->run_hooks("report_do_report_end");

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

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

			exit;
}
}

			exit;
}
}

Zeile 217Zeile 236

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


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

		$error = $lang->error_invalid_report;

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

	}
}


	}
}


Zeile 242Zeile 261
		}
else
{

		}
else
{

 
			$reportreasons = $cache->read('reportreasons');
$reasons = $reportreasons[$report_type];
$reasonslist = '';
foreach($reasons as $reason)
{
$reason['title'] = htmlspecialchars_uni($lang->parse($reason['title']));
eval("\$reasonslist .= \"".$templates->get("report_reason")."\";");
}

			eval("\$report_reasons = \"".$templates->get("report_reasons")."\";");
}
}

			eval("\$report_reasons = \"".$templates->get("report_reasons")."\";");
}
}