summaryrefslogtreecommitdiff
path: root/lib/VNWeb/Discussions
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-08-31 09:00:13 +0200
committerYorhel <git@yorhel.nl>2020-08-31 09:00:13 +0200
commitc73730ee24f6e72e68b0670decff03e3cee29789 (patch)
tree1887576bf11a7a263e4044419534a16a08705d74 /lib/VNWeb/Discussions
parent537c335f9df183398aee435246afefb322069aa7 (diff)
Discussions/Reviews: Return 404 when requested post or comment does not exist
Diffstat (limited to 'lib/VNWeb/Discussions')
-rw-r--r--lib/VNWeb/Discussions/Thread.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/Discussions/Thread.pm b/lib/VNWeb/Discussions/Thread.pm
index 3712826d..bafe5449 100644
--- a/lib/VNWeb/Discussions/Thread.pm
+++ b/lib/VNWeb/Discussions/Thread.pm
@@ -180,7 +180,7 @@ TUWF::get qr{/$RE{tid}(?:(?<sep>[\./])$RE{num})?}, sub {
WHERE tp.tid =', \$id, '
ORDER BY tp.num'
);
- return tuwf->resNotFound if !@$posts;
+ return tuwf->resNotFound if !@$posts || ($num && !grep $_->{num} == $num, @$posts);
my $poll_options = $t->{poll_question} && tuwf->dbAlli(
'SELECT tpo.id, tpo.option, count(u.id) as votes, tpm.optid IS NOT NULL as my