summaryrefslogtreecommitdiff
path: root/lib/VNWeb/HTML.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-11-19 11:37:38 +0100
committerYorhel <git@yorhel.nl>2019-11-19 11:37:44 +0100
commit0995b205d39236c23aaa984ddb2e39dec38d7dce (patch)
tree5e3c5426f3fb111896c600e26186bd1250923e02 /lib/VNWeb/HTML.pm
parentbd2ff24a35ec70aad52ae5352ce349da53ee5248 (diff)
Fix consistency between discussion counter in the dbentry tabs and actual listing
i.e. private and hidden threads are now included in the counter if you can see those threads.
Diffstat (limited to 'lib/VNWeb/HTML.pm')
-rw-r--r--lib/VNWeb/HTML.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/HTML.pm b/lib/VNWeb/HTML.pm
index 24989851..c35a2518 100644
--- a/lib/VNWeb/HTML.pm
+++ b/lib/VNWeb/HTML.pm
@@ -333,7 +333,7 @@ sub _maintabs_ {
SELECT COUNT(*)
FROM threads_boards tb
JOIN threads t ON t.id = tb.tid
- WHERE}, { 'tb.type' => $t, 'tb.iid' => $o->{id}, 't.hidden' => 0, 't.private' => 0 });
+ WHERE tb.type =}, \$t, 'AND tb.iid =', \$o->{id}, 'AND', VNWeb::Discussions::Lib::sql_visible_threads());
t disc => "/t/$id", "discussions ($cnt)";
};
t posts => "/$id/posts", 'posts' if $t eq 'u';