X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=NDWeb%2FPages%2FForum.pm;h=1bd5793134406cb9a769b7bbb6071f9c1ea2c821;hb=f6368f63a2934e3203babc87818e54714ec336d7;hp=2696dd79733e90d5d82c6349407d911dba29ccce;hpb=f147fbcd423310c1002b463bf27dbaad5a95c050;p=ndwebbie.git diff --git a/NDWeb/Pages/Forum.pm b/NDWeb/Pages/Forum.pm index 2696dd7..1bd5793 100644 --- a/NDWeb/Pages/Forum.pm +++ b/NDWeb/Pages/Forum.pm @@ -170,16 +170,15 @@ sub render_body { $threads->execute($ND::UID) or warn $DBH->errstr; my @categories; my $category = {fcid => 0}; - my $board = {fbid => 0}; + my $board = {id => 0}; while (my $thread = $threads->fetchrow_hashref){ if ($category->{fcid} != $thread->{fcid}){ delete $category->{fcid}; $category = {fcid => $thread->{fcid}, category => $thread->{category}}; push @categories,$category; } - if ($board->{fbid} != $thread->{fbid}){ - delete $board->{fbid}; - $board = {fbid => $thread->{fbid}, board => $thread->{board}}; + if ($board->{id} != $thread->{fbid}){ + $board = {id => $thread->{fbid}, board => $thread->{board}}; push @{$category->{Boards}},$board; } delete $thread->{fcid}; @@ -189,7 +188,6 @@ sub render_body { push @{$board->{Threads}},$thread; } delete $category->{fcid}; - delete $board->{fbid}; $BODY->param(Categories => \@categories); }elsif($board){ #List threads in this board