X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FForum.pm;h=a9b1cb5f3a7302e82bb3d471237e1ed21ea9b8d6;hb=77bd36f5189b0de25ff99ffec16d9e9187feb2fd;hp=2de3ea82e105d286704caa3bbdc4be8ee64b1b83;hpb=28cc9c2d61cf6ee0bfcd02c82e0195efaf6cf27a;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/Forum.pm b/lib/NDWeb/Controller/Forum.pm index 2de3ea8..a9b1cb5 100644 --- a/lib/NDWeb/Controller/Forum.pm +++ b/lib/NDWeb/Controller/Forum.pm @@ -189,6 +189,8 @@ sub board : Local { } $c->stash(threads => \@threads); + $c->stash(title => "$board->{board} ($board->{category})"); + $c->forward('listModeratorBoards', [$board->{fbid}]) if $board->{moderate}; } @@ -198,15 +200,18 @@ sub thread : Local { my $dbh = $c->model; $c->forward('findThread'); - unless ($c->stash->{thread}){ + $thread = $c->stash->{thread}; + unless ($thread){ $c->stash(template => 'default.tt2'); $c->res->status(404); return; } my $query = $dbh->prepare(q{SELECT uid,username FROM users u JOIN forum_priv_access fta USING (uid) WHERE fta.ftid = $1}); - $query->execute($thread); + $query->execute($thread->{ftid}); $c->stash(access => $query->fetchall_arrayref({}) ); + $c->stash(title => $thread->{subject} + . " ($thread->{category} - $thread->{board})"); $c->forward('findPosts'); $c->forward('markThreadAsRead') if $c->user_exists; if ($c->stash->{thread}->{moderate}) {