diff options
author | Yorhel <git@yorhel.nl> | 2020-03-13 17:02:15 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-03-13 17:02:18 +0100 |
commit | ebbd130baace7030bd283d943848a0cb865e74ac (patch) | |
tree | 00aa886ee93e44cc7113184d5a0d374a43dce02c /lib/VNWeb/Discussions | |
parent | d3b7d3ff7a70e726d221d78f4e991ec76f75909f (diff) |
Discussions::Thread: Show a 404 if there are no posts to display
This happens when browsing to a large page number.
Diffstat (limited to 'lib/VNWeb/Discussions')
-rw-r--r-- | lib/VNWeb/Discussions/Thread.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/VNWeb/Discussions/Thread.pm b/lib/VNWeb/Discussions/Thread.pm index e410c920..40b96ec1 100644 --- a/lib/VNWeb/Discussions/Thread.pm +++ b/lib/VNWeb/Discussions/Thread.pm @@ -169,6 +169,7 @@ TUWF::get qr{/$RE{tid}(?:/$RE{num})?}, sub { WHERE tp.tid =', \$id, ' ORDER BY tp.num' ); + return tuwf->resNotFound if !@$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 |