summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorctrlcctrlv <wizardchan@hush.com>2013-08-09 17:53:23 +0000
committerctrlcctrlv <wizardchan@hush.com>2013-08-09 17:53:23 +0000
commit52df2bd5fd4998455cb0509fbedc095a199458f0 (patch)
tree72718f168b23254a0cfb28aeb1b4f8da344032ca /post.php
parent8b71029b55147759c445b4a049bddbdb75c74d91 (diff)
Critical bug: users could not report OP posts, only replies
Diffstat (limited to 'post.php')
-rw-r--r--post.php7
1 files changed, 6 insertions, 1 deletions
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: ' .