summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-05-11 13:09:29 +0200
committerYorhel <git@yorhel.nl>2020-05-11 13:09:29 +0200
commit5a0b3d8119c530ffb1306e9e96b34dbc86be3c74 (patch)
treec14546aed10c2c577f8aa418a2a3546d8c4433ee
parent3c5907b376019b2790813c540ca062a8dff35fdc (diff)
Char::Page: Fix check for non-logged in visitors
-rw-r--r--lib/VNWeb/Chars/Page.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNWeb/Chars/Page.pm b/lib/VNWeb/Chars/Page.pm
index 5251d95f..d46cc2de 100644
--- a/lib/VNWeb/Chars/Page.pm
+++ b/lib/VNWeb/Chars/Page.pm
@@ -80,8 +80,8 @@ sub image_ {
my $vio = $img->{violence_avg} > 1.3 ? 2 : $img->{violence_avg} > 0.4 ? 1 : 0 if $img->{votecount};
my $sexd = ['Safe', 'Suggestive', 'Explicit']->[$sex] if $img->{votecount};
my $viod = ['Tame', 'Violent', 'Brutal' ]->[$vio] if $img->{votecount};
- my $sexh = $sex > auth->pref('max_sexual')||0 if $img->{votecount};
- my $vioh = $vio > auth->pref('max_violence')||0 if $img->{votecount};
+ my $sexh = $sex > (auth->pref('max_sexual')||0) if $img->{votecount};
+ my $vioh = $vio > (auth->pref('max_violence')||0) if $img->{votecount};
my $hide_on_click = $sex || $vio || !$img->{votecount};
label_ class => 'imghover', style => "width: $img->{width}px; height: $img->{height}px", sub {