summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VNDB/DB/Discussions.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/VNDB/DB/Discussions.pm b/lib/VNDB/DB/Discussions.pm
index 1e626c57..8e476f55 100644
--- a/lib/VNDB/DB/Discussions.pm
+++ b/lib/VNDB/DB/Discussions.pm
@@ -143,8 +143,10 @@ sub dbThreadCount {
my($self, $type, $iid) = @_;
return $self->dbRow(q|
SELECT COUNT(*) AS cnt
- FROM threads_tags
- WHERE type = ? AND iid = ?|,
+ FROM threads_tags tt
+ JOIN threads t ON t.id = tt.tid
+ WHERE tt.type = ? AND tt.iid = ?
+ AND t.hidden = FALSE|,
$type, $iid)->{cnt};
}