summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/Discussions.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-07-07 13:18:50 +0200
committerYorhel <git@yorhel.nl>2009-07-07 13:18:50 +0200
commit087b1697606292d945524af4f84ba5899749409e (patch)
tree742c493be4f2391eb518212bcd02b4fb349fd775 /lib/VNDB/DB/Discussions.pm
parentd59124e057e3a10dac0a3a448f4503679810850c (diff)
Hide threads targeted at users from the main page
Diffstat (limited to 'lib/VNDB/DB/Discussions.pm')
-rw-r--r--lib/VNDB/DB/Discussions.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Discussions.pm b/lib/VNDB/DB/Discussions.pm
index b28bfeab..78a462df 100644
--- a/lib/VNDB/DB/Discussions.pm
+++ b/lib/VNDB/DB/Discussions.pm
@@ -8,7 +8,7 @@ use Exporter 'import';
our @EXPORT = qw|dbThreadGet dbThreadEdit dbThreadAdd dbPostGet dbPostEdit dbPostAdd dbThreadCount|;
-# Options: id, type, iid, results, page, what
+# Options: id, type, iid, results, page, what, notusers
# What: boards, boardtitles, firstpost, lastpost
sub dbThreadGet {
my($self, %o) = @_;
@@ -26,6 +26,8 @@ sub dbThreadGet {
't.id IN(SELECT tid FROM threads_boards WHERE type = ?)' => $o{type} ) : (),
$o{type} && $o{iid} ? (
'tb.type = ?' => $o{type}, 'tb.iid = ?' => $o{iid} ) : (),
+ $o{notusers} ? (
+ 't.id NOT IN(SELECT tid FROM threads_boards WHERE type = \'u\')' => 1) : (),
);
my @select = (