]> ruin.nu Git - ndwebbie.git/blobdiff - ND/Web/Pages/Forum.pm
don't list planets and log board on all unread board
[ndwebbie.git] / ND / Web / Pages / Forum.pm
index 76a7e62438611ff9990735d4d304f79e0eaaf8f5..06b3dfd5738e8a0b6d3b5e085b3f8bb60d034870 100644 (file)
@@ -88,8 +88,11 @@ sub render_body {
                        }
                        if (param('cmd') eq 'Submit' and $thread && $thread->{post}){
                                addForumPost($DBH,$thread,$ND::UID,param('message'));
+                               $self->{RETURN} = 'REDIRECT';
+                               $self->{REDIR_LOCATION} = "/forum?t=$thread->{id}#NewPosts";
                        }
                        $DBH->commit or $ND::ERROR .= p($DBH->errstr);
+                       return if $self->{RETURN};
                }
                if(param('cmd') eq 'Move' && $board->{moderate}){
                        $DBH->begin_work;
@@ -161,6 +164,7 @@ sub render_body {
                        $boards->execute($category->{id},$ND::UID) or $ND::ERROR .= p($DBH->errstr);
                        my @boards;
                        while (my $board = $boards->fetchrow_hashref){
+                               next if $board->{id} < 0;
                                $threads->execute($board->{id},$ND::UID,1) or $ND::ERROR .= p($DBH->errstr);
                                my $i = 0;
                                my @threads;