summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-08-03 11:01:00 +0200
committerYorhel <git@yorhel.nl>2021-08-03 11:01:00 +0200
commit82267a30fd0e9d46e7be76204f34c232b438b874 (patch)
tree7c343c07bb4dc486b8a4acce1439384f02f4834a /lib
parentb268c00f603563c810ee3a5b3321e06420d2d7af (diff)
VNLengthVote: Fix migration script + no need to query DB when !$canvote
Diffstat (limited to 'lib')
-rw-r--r--lib/VNWeb/VN/Page.pm2
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