From 52df2bd5fd4998455cb0509fbedc095a199458f0 Mon Sep 17 00:00:00 2001 From: ctrlcctrlv Date: Fri, 9 Aug 2013 17:53:23 +0000 Subject: [PATCH] Critical bug: users could not report OP posts, only replies --- post.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/post.php b/post.php index 6a23b64c..98709d97 100644 --- a/post.php +++ b/post.php @@ -117,7 +117,12 @@ if (isset($_POST['delete'])) { $query->execute() or error(db_error($query)); $thread = $query->fetchColumn(); - + + // If they are not reporting a reply, report the OP. + if (!$thread) { + $thread = $id; + } + if ($thread) { if ($config['syslog']) _syslog(LOG_INFO, 'Reported post: ' .