X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=ND%2FWeb%2FForum.pm;fp=ND%2FWeb%2FForum.pm;h=1b06b8a6cbfff3b9aadfce60e79263d67ad054de;hb=06830a05ebd5541e52f8ca4e421286c1313420c7;hp=59b8625c0526382c657f5f4f2d1e70d1649fc49a;hpb=0de73d6e8744b300650b12edae899f6a865c58a8;p=ndwebbie.git diff --git a/ND/Web/Forum.pm b/ND/Web/Forum.pm index 59b8625..1b06b8a 100644 --- a/ND/Web/Forum.pm +++ b/ND/Web/Forum.pm @@ -37,7 +37,7 @@ sub viewForumThread { $template->param(Id => $thread->{id}); $template->param(Post => $thread->{post}); - my $posts = $ND::DBH->prepare(q{SELECT u.username,date_trunc('minute',fp.time::timestamp) AS time,fp.message,COALESCE(fp.time > ftv.time,TRUE) AS unread + my $posts = $ND::DBH->prepare(q{SELECT u.username,date_trunc('seconds',fp.time::timestamp) AS time,fp.message,COALESCE(fp.time > ftv.time,TRUE) AS unread FROM forum_threads ft JOIN forum_posts fp USING (ftid) JOIN users u USING (uid) LEFT OUTER JOIN (SELECT * FROM forum_thread_visits WHERE uid = $2) ftv ON ftv.ftid = ft.ftid WHERE ft.ftid = $1 ORDER BY fp.time ASC