X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=ND%2FWeb%2FPages%2FForum.pm;h=8c21cd2792826a1173734e2c02c31db651590075;hb=0de73d6e8744b300650b12edae899f6a865c58a8;hp=17ef00b5ce20fe76c7edd30e0edbe0d9ce3ea1bd;hpb=31e4eaf3a4a406789d63f2c5d81c366091164404;p=ndwebbie.git diff --git a/ND/Web/Pages/Forum.pm b/ND/Web/Pages/Forum.pm index 17ef00b..8c21cd2 100644 --- a/ND/Web/Pages/Forum.pm +++ b/ND/Web/Pages/Forum.pm @@ -82,12 +82,12 @@ sub render { } if (defined param('cmd')){ - if(param('cmd') eq 'Submit'){ + if(param('cmd') eq 'Submit' or param('cmd') eq 'Preview'){ $DBH->begin_work; if ($board && $board->{post}){ $thread = addForumThread $DBH,$board,$ND::UID,param('subject'); } - if ($thread && $thread->{post}){ + if (param('cmd') eq 'Submit' and $thread && $thread->{post}){ addForumPost($DBH,$thread,$ND::UID,param('message')); } $DBH->commit or $ND::ERROR .= p($DBH->errstr);