summaryrefslogtreecommitdiff
path: root/lib/VNWeb/Reviews/Page.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VNWeb/Reviews/Page.pm')
-rw-r--r--lib/VNWeb/Reviews/Page.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/VNWeb/Reviews/Page.pm b/lib/VNWeb/Reviews/Page.pm
index 72bad7b1..8822b2ed 100644
--- a/lib/VNWeb/Reviews/Page.pm
+++ b/lib/VNWeb/Reviews/Page.pm
@@ -2,6 +2,7 @@ package VNWeb::Reviews::Page;
use VNWeb::Prelude;
use VNWeb::Releases::Lib;
+use VNWeb::Reviews::Lib;
my $COMMENT = form_compile any => {
@@ -65,12 +66,12 @@ sub review_ {
} if $w->{spoiler};
tr_ @spoil, sub {
td_ 'Review';
- td_ sub { lit_ bb_format $w->{text} }
+ td_ sub { lit_ reviews_format $w }
};
- tr_ sub {
+ tr_ @spoil, sub {
td_ '';
td_ style => 'text-align: right', sub {
- elm_ 'Reviews.Vote' => $VNWeb::Reviews::Elm::VOTE_OUT, {%$w, mod => auth->permBoardmod} if auth && ($w->{can} || auth->permBoardmod);
+ reviews_vote_ $w;
};
};
}
@@ -80,7 +81,7 @@ sub review_ {
TUWF::get qr{/$RE{wid}(?:(?<sep>[\./])$RE{num})?}, sub {
my($id, $sep, $num) = (tuwf->capture('id'), tuwf->capture('sep')||'', tuwf->capture('num'));
my $w = tuwf->dbRowi(
- 'SELECT r.id, r.vid, r.rid, r.isfull, r.text, r.spoiler, COALESCE(c.count,0) AS count, r.c_flagged, uv.vote, rm.id IS NULL AS can
+ 'SELECT r.id, r.vid, r.rid, r.isfull, r.text, r.spoiler, COALESCE(c.count,0) AS count, r.c_flagged, r.c_up, r.c_down, uv.vote, rm.id IS NULL AS can
, v.title, rel.title AS rtitle, rel.original AS roriginal, rel.type AS rtype, rv.vote AS my, COALESCE(rv.overrule,false) AS overrule
, ', sql_user(), ',', sql_totime('r.date'), 'AS date,', sql_totime('r.lastmod'), 'AS lastmod
FROM reviews r