MyBB Community Forums

Full Version: Disallow Multiple Reports?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
So that after checking it disallows all the reports reported on the same post, so basically after one is reported, it checks if its not being reported again and throws that error, right?
In simple terms, if the post has already been reported, then it will throw that error.
Hello, sorry to disturb again but using this code the problem I found while testing on localhost:

- When the post was reported and was marked as read, even after it when its reported again it still says already reported.

What to do?
Try this;
$check = $db->query("SELECT * FROM mybb_reportedposts WHERE pid = ".$mybb->input['pid']." AND reportstatus = '0'");
$report = $db->fetch_array($check);

if($report['pid'] == $mybb->input['pid'])
{
	error("This post is already reported.");
}
Great, works fine, I guess we needed to check the report status if its 0 or 1. Thanks Yaldaram. Smile
Pages: 1 2