summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/VNPage.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2015-01-28 19:22:03 +0100
committerYorhel <git@yorhel.nl>2015-01-28 19:22:03 +0100
commitf8b999c3f1842a5ef4836a9f56df7b87d9106466 (patch)
tree6872b2df80fb36cccde613270b350af1423c230a /lib/VNDB/Handler/VNPage.pm
parent8e1df87626b97239bf7dc2f00cbbe0ea86100810 (diff)
Hide spoilerous characters from the VN staff pages by default
To fix an issue mentioned in <https://vndb.org/t6138.15>. Yay for writing patches on the live site.
Diffstat (limited to 'lib/VNDB/Handler/VNPage.pm')
-rw-r--r--lib/VNDB/Handler/VNPage.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm
index f75d02d7..00e27b4b 100644
--- a/lib/VNDB/Handler/VNPage.pm
+++ b/lib/VNDB/Handler/VNPage.pm
@@ -1126,10 +1126,11 @@ sub _staff {
end 'table';
end;
}
- if(@{$v->{seiyuu}}) {
+ my @seiyuu = grep !$_->{spoil}, @{$v->{seiyuu}};
+ if(@seiyuu) {
div class => 'mainbox staff cast';
h1 mt '_vnpage_cast';
- my $has_notes = grep { $_->{note} } @{$v->{seiyuu}};
+ my $has_notes = grep { $_->{note} } @seiyuu;
table class => 'stripe';
thead;
Tr;
@@ -1138,7 +1139,8 @@ sub _staff {
td class => 'tc3', mt '_staff_col_note' if $has_notes;
end;
end;
- for my $s (@{$v->{seiyuu}}) {
+ for my $s (@seiyuu) {
+ next if $s->{spoil};
Tr;
td class => 'tc1';
a href => "/c$s->{cid}", $s->{cname};