X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=ND%2FWeb%2FPages%2FForum.pm;h=b18bc350c8ddb08044395c922377f5b02ba402de;hb=c6a6e6dbab0ca435e6aeeb94e7c7329585b7b4f1;hp=76a7e62438611ff9990735d4d304f79e0eaaf8f5;hpb=707131893fa280d8964883b821636de7022fecd0;p=ndwebbie.git diff --git a/ND/Web/Pages/Forum.pm b/ND/Web/Pages/Forum.pm index 76a7e62..b18bc35 100644 --- a/ND/Web/Pages/Forum.pm +++ b/ND/Web/Pages/Forum.pm @@ -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; @@ -221,6 +225,7 @@ sub render_body { ,undef,$board->{fcid}) or $ND::ERROR .= p($DBH->errstr); $BODY->param(Category => $category); + }elsif($self->{URI} =~ m{^/.*/search/(.*)}){ #List threads in this board }else{ #List boards $BODY->param(Overview => 1); $categories->execute or $ND::ERROR .= p($DBH->errstr);