diff options
author | Yorhel <git@yorhel.nl> | 2020-04-25 09:30:53 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-04-25 09:30:56 +0200 |
commit | 1b4cfae7ab8d31423aea9d8822e22f414bd9e3ab (patch) | |
tree | 0f843072214d060144e150d4690c13af2b388777 | |
parent | a5e4907fb2a9ae8fe010365662a3306e0ae759ca (diff) |
VN::Page: Fix two more warnings related to old revisions
Another case of a removed staff alias + a case of screenshot release not
being set (early versions of the DB didn't keep track of that).
-rw-r--r-- | lib/VNWeb/VN/Page.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VNWeb/VN/Page.pm b/lib/VNWeb/VN/Page.pm index 47f33176..a8ffa88a 100644 --- a/lib/VNWeb/VN/Page.pm +++ b/lib/VNWeb/VN/Page.pm @@ -62,7 +62,8 @@ sub rev_ { [ desc => 'Description' ], [ length => 'Length', fmt => \%VN_LENGTH ], [ staff => 'Credits', fmt => sub { - a_ href => "/s$_->{sid}", title => $_->{original}||$_->{name}, $_->{name}; + a_ href => "/s$_->{sid}", title => $_->{original}||$_->{name}, $_->{name} if $_->{sid}; + b_ class => 'grayedout', '[removed alias]' if !$_->{sid}; txt_ " [$CREDIT_TYPE{$_->{role}}]"; txt_ " [$_->{note}]" if $_->{note}; }], @@ -692,7 +693,7 @@ sub screenshots_ { return if !@$s; my %rel; - push $rel{$_->{rid}}->@*, $_ for @$s; + push $rel{$_->{rid}}->@*, $_ for grep $_->{rid}, @$s; input_ id => 'nsfwhide_chk', type => 'checkbox', class => 'visuallyhidden', auth->pref('show_nsfw') ? (checked => 'checked') : (); div_ class => 'mainbox', id => 'screenshots', sub { |