summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB
diff options
context:
space:
mode:
authormorkt <morkt@users.noreply.github.com>2015-10-18 12:32:05 +0400
committermorkt <morkt@users.noreply.github.com>2015-10-18 12:32:05 +0400
commitddbf3ae0ae530954b0e105e99819c85cfe4de17c (patch)
tree111cc30dd0311fd8754fa8a1d0572c8fc5d7e7c5 /lib/VNDB/DB
parent710df2e42bb5558a611577ee6f374b4450b37f84 (diff)
discussion board polls.
Diffstat (limited to 'lib/VNDB/DB')
-rw-r--r--lib/VNDB/DB/Discussions.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VNDB/DB/Discussions.pm b/lib/VNDB/DB/Discussions.pm
index 2be975db..2af85c4e 100644
--- a/lib/VNDB/DB/Discussions.pm
+++ b/lib/VNDB/DB/Discussions.pm
@@ -41,6 +41,7 @@ sub dbThreadGet {
qw|t.id t.title t.count t.locked t.hidden|,
$o{what} =~ /firstpost/ ? ('tpf.uid AS fuid', q|EXTRACT('epoch' from tpf.date) AS fdate|, 'uf.username AS fusername') : (),
$o{what} =~ /lastpost/ ? ('tpl.uid AS luid', q|EXTRACT('epoch' from tpl.date) AS ldate|, 'ul.username AS lusername') : (),
+ 'p.id AS poll',
);
my @join = (
@@ -54,6 +55,7 @@ sub dbThreadGet {
) : (),
$o{type} && $o{iid} ?
'JOIN threads_boards tb ON tb.tid = t.id' : (),
+ 'LEFT JOIN polls p ON p.tid = t.id',
);
my $order = sprintf {