diff options
author | Yorhel <git@yorhel.nl> | 2021-08-03 11:01:00 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2021-08-03 11:01:00 +0200 |
commit | 82267a30fd0e9d46e7be76204f34c232b438b874 (patch) | |
tree | 7c343c07bb4dc486b8a4acce1439384f02f4834a /lib | |
parent | b268c00f603563c810ee3a5b3321e06420d2d7af (diff) |
VNLengthVote: Fix migration script + no need to query DB when !$canvote
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNWeb/VN/Page.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/VN/Page.pm b/lib/VNWeb/VN/Page.pm index 567194f3..cfb3a649 100644 --- a/lib/VNWeb/VN/Page.pm +++ b/lib/VNWeb/VN/Page.pm @@ -160,7 +160,7 @@ sub infobox_length_ { my $canvote = auth->permLengthvote && grep $_->{type} ne 'trial' && $_->{released} <= $today, $v->{releases}->@*; return if !$v->{length} && !$canvote; - my $vote = tuwf->dbRowi('SELECT rid, length, speed, notes FROM vn_length_votes WHERE vid =', \$v->{id}, 'AND uid =', \auth->uid); + my $vote = $canvote && tuwf->dbRowi('SELECT rid, length, speed, notes FROM vn_length_votes WHERE vid =', \$v->{id}, 'AND uid =', \auth->uid); # TODO: Display aggregated vote stats |