Posts: 13,646
Threads: 220
Joined: May 2010
Reputation:
550
2011-07-23, 07:31 AM
You'd have to check if the pid is in mybb_reportedposts.
No longer involved in the MyBB project.
Posts: 13,646
Threads: 220
Joined: May 2010
Reputation:
550
2011-07-23, 09:05 AM
(This post was last modified: 2011-07-23, 09:29 AM by Nathan Malcolm.)
Not sure 100%, but try this:
$check = $db->query("SELECT rid FROM mybb_reportedposts WHERE pid = ".$mybb->input['pid']."");
$report = $db->num_rows($check);
if($report > 0) {
error("This post is already reported.");
}
No longer involved in the MyBB project.
Posts: 13,646
Threads: 220
Joined: May 2010
Reputation:
550
2011-07-23, 09:30 AM
Oops, sorry about that. Try the new version in my previous post.
No longer involved in the MyBB project.
Posts: 13,646
Threads: 220
Joined: May 2010
Reputation:
550
2011-07-23, 10:30 AM
No problem, glad I could help.
No longer involved in the MyBB project.
Posts: 13,646
Threads: 220
Joined: May 2010
Reputation:
550
2011-07-23, 11:13 AM
(This post was last modified: 2011-07-23, 11:14 AM by Nathan Malcolm.)
It checks how many rows are in the table with the specified pid.
No longer involved in the MyBB project.