]> ruin.nu Git - ndwebbie.git/blobdiff - ND/Web/Pages/Forum.pm
oops
[ndwebbie.git] / ND / Web / Pages / Forum.pm
index a54d23e42eca8188eb07e6b0be8383ef5e5094e1..17ef00b5ce20fe76c7edd30e0edbe0d9ce3ea1bd 100644 (file)
@@ -202,10 +202,6 @@ sub render {
                        my @categories;
                        while (my $category = $categories->fetchrow_hashref){
                                $boards->execute($category->{id},$ND::UID) or $ND::ERROR .= p($DBH->errstr);
-                               #TODO: really need to do this outside, so you don't need moderate access
-                               if ($category->{id} == $board->{fcid}){
-                                       $BODY->param(Category => $category->{category});
-                               }
 
                                my @boards;
                                while (my $b = $boards->fetchrow_hashref){
@@ -219,6 +215,9 @@ sub render {
                        }
                        $BODY->param(Categories => \@categories);
                }
+               my ($category) = $DBH->selectrow_array(q{SELECT category FROM forum_categories WHERE fcid = $1}
+                       ,undef,$board->{fcid}) or $ND::ERROR .= p($DBH->errstr);
+               $BODY->param(Category =>  $category);
 
        }else{ #List boards
                $BODY->param(Overview => 1);