]> ruin.nu Git - ndwebbie.git/blobdiff - ND/Web/Forum.pm
graphs
[ndwebbie.git] / ND / Web / Forum.pm
index 8eca745423053ee6332f147d8c9df52f00a5cc7e..1c1ecedc9b15ec1a10b131e20c07762e07d6d0a4 100644 (file)
@@ -34,7 +34,6 @@ sub viewForumThread {
 
        my $template = HTML::Template->new(filename => "templates/viewthread.tmpl", global_vars => 1, cache => 1);
 
-       $template->param(Subject => $thread->{subject});
        $template->param(Id => $thread->{id});
        $template->param(Post => $thread->{post});
 
@@ -54,7 +53,12 @@ ORDER BY fp.time ASC
                $post->{message} = parseMarkup($post->{message});
                push @posts,$post;
        }
+
+       if (defined param('cmd') && param('cmd') eq 'Preview'){
+               push @posts,{message => parseMarkup(escapeHTML(param('message'))), unread => 1, username => 'PREVIEW', Time => 'Not submitted yet', NewPosts => $old ? 1 : 0};
+       }
        $template->param(Posts => \@posts);
+       $template->param(Message => param('message'));
 
        markThreadAsRead($thread->{id});