summaryrefslogtreecommitdiff
path: root/lib/VNWeb/Reviews/Page.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VNWeb/Reviews/Page.pm')
-rw-r--r--lib/VNWeb/Reviews/Page.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/VNWeb/Reviews/Page.pm b/lib/VNWeb/Reviews/Page.pm
index 927a39f4..8aa35d4c 100644
--- a/lib/VNWeb/Reviews/Page.pm
+++ b/lib/VNWeb/Reviews/Page.pm
@@ -119,10 +119,8 @@ TUWF::get qr{/$RE{wid}(?:(?<sep>[\./])$RE{num})?}, sub {
);
return tuwf->resNotFound if $num && !grep $_->{num} == $num, @$posts;
- # Mark a notification for this thread as read, if there is one.
- tuwf->dbExeci(
- 'UPDATE notifications SET read = NOW() WHERE uid =', \auth->uid, 'AND iid =', \$id, 'AND read IS NULL'
- ) if auth && $w->{count} <= $page*25;
+ auth->notiRead($id, undef);
+ auth->notiRead($id, [ map $_->{num}, $posts->@* ]) if @$posts;
my $title = "Review of $w->{title}";
framework_ title => $title, index => 1, type => 'w', dbobj => $w,