summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Chars.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VNDB/Handler/Chars.pm')
-rw-r--r--lib/VNDB/Handler/Chars.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/VNDB/Handler/Chars.pm b/lib/VNDB/Handler/Chars.pm
index f667d41b..c59d44b9 100644
--- a/lib/VNDB/Handler/Chars.pm
+++ b/lib/VNDB/Handler/Chars.pm
@@ -66,10 +66,9 @@ sub page {
div class => 'mainbox';
$self->htmlItemMessage('c', $r);
+ my $spoil = $self->authPref('spoilers')||0;
p id => 'charspoil_sel';
- a href => '#', class => 'sel', mt '_spoilset_0';
- a href => '#', mt '_spoilset_1';
- a href => '#', mt '_spoilset_2';
+ a href => '#', $spoil == $_ ? (class => 'sel') : (), mt "_spoilset_$_" for (0..2);
end;
h1 $r->{name};
h2 class => 'alttitle', $r->{original} if $r->{original};
@@ -487,7 +486,9 @@ sub list {
);
return $self->resNotFound if $f->{_err};
- my($list, $np) = $self->filFetchDB(char => $f->{fil}, {}, {
+ my($list, $np) = $self->filFetchDB(char => $f->{fil}, {
+ tagspoil => $self->authPref('spoilers')||0,
+ }, {
$fch ne 'all' ? ( char => $fch ) : (),
$f->{q} ? ( search => $f->{q} ) : (),
results => 50,