]> ruin.nu Git - ndwebbie.git/blobdiff - ND/Web/Pages/Forum.pm
keep track of last forum visit, so we can check if posts are really new, or just...
[ndwebbie.git] / ND / Web / Pages / Forum.pm
index 6a703fbe909319f2261d1b33e736bf81d26cc4b0..2b287a9d1193828485eef2d7f556e0d54f7f4afe 100644 (file)
@@ -19,8 +19,7 @@
 
 package ND::Web::Pages::Forum;
 use strict;
-use warnings FATAL => 'all';
-no warnings 'uninitialized';
+use warnings;
 use ND::Web::Forum;
 use CGI qw/:standard/;
 use ND::Web::Include;
@@ -43,6 +42,8 @@ sub render {
 
        $ND::TEMPLATE->param(TITLE => 'Forum');
 
+       $DBH->do(q{UPDATE users SET last_forum_visit = NOW() WHERE uid = $1},undef,$ND::UID) or $ND::ERROR .= p($DBH->errstr);
+
        my $board;
        if(param('b')){
                my $boards = $DBH->prepare(q{SELECT fb.fbid AS id,fb.board, bool_or(fa.post) AS post