summaryrefslogtreecommitdiff
path: root/lib/VNWeb/Chars/List.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-02-12 10:16:02 +0100
committerYorhel <git@yorhel.nl>2021-03-01 10:16:33 +0100
commitfc3721171f021807d1c8b23a5257fc1ac1809ea5 (patch)
treebcd63e797e26e17d73be02d90ea52b4f5c2da497 /lib/VNWeb/Chars/List.pm
parent86d0191251fc80205dce92369b9b661cb40a3707 (diff)
SQL: vndbid data type conversion for most DB entries
I had wanted to split this up into multiple commits and roll out in stages, but couldn't really find a natural way to do so. There are several places that take a generic identifier and expect it to work the same for all entries they support, so changing one entry at a time wasn't going to be any easier. Only the tags & traits haven't been updated yet, I'll convert those later. While this is a major change and affects a lot of code, the individual changes are all pretty simple. I'm surprised how much code did not have to be updated at all. No doubt I've missed a few places, though, so this commit will almost certainly break something.
Diffstat (limited to 'lib/VNWeb/Chars/List.pm')
-rw-r--r--lib/VNWeb/Chars/List.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/VNWeb/Chars/List.pm b/lib/VNWeb/Chars/List.pm
index 7f48981c..8c01672f 100644
--- a/lib/VNWeb/Chars/List.pm
+++ b/lib/VNWeb/Chars/List.pm
@@ -24,9 +24,9 @@ sub listing_ {
abbr_ class => "icons gen $_->{gender}", title => $GENDER{$_->{gender}}, '' if $_->{gender} ne 'unknown';
};
td_ class => 'tc2', sub {
- a_ href => "/c$_->{id}", title => $_->{original}||$_->{name}, $_->{name};
+ a_ href => "/$_->{id}", title => $_->{original}||$_->{name}, $_->{name};
b_ class => 'grayedout', sub {
- join_ ', ', sub { a_ href => "/v$_->{id}", title => $_->{original}||$_->{title}, $_->{title} }, $_->{vn}->@*;
+ join_ ', ', sub { a_ href => "/$_->{id}", title => $_->{original}||$_->{title}, $_->{title} }, $_->{vn}->@*;
};
};
} for @$list;
@@ -39,17 +39,17 @@ sub listing_ {
div_ sub {
if($_->{image}) {
my($iw,$ih) = imgsize $_->{image}{width}*100, $_->{image}{height}*100, $w, $h;
- image_ $_->{image}, alt => $_->{name}, width => $iw, height => $ih, url => "/c$_->{id}";
+ image_ $_->{image}, alt => $_->{name}, width => $iw, height => $ih, url => "/$_->{id}";
} else {
txt_ 'no image';
}
};
div_ sub {
abbr_ class => "icons gen $_->{gender}", title => $GENDER{$_->{gender}}, '' if $_->{gender} ne 'unknown';
- a_ href => "/c$_->{id}", title => $_->{original}||$_->{name}, $_->{name};
+ a_ href => "/$_->{id}", title => $_->{original}||$_->{name}, $_->{name};
br_;
b_ class => 'grayedout', sub {
- join_ ', ', sub { a_ href => "/v$_->{id}", title => $_->{original}||$_->{title}, $_->{title} }, $_->{vn}->@*;
+ join_ ', ', sub { a_ href => "/$_->{id}", title => $_->{original}||$_->{title}, $_->{title} }, $_->{vn}->@*;
};
};
} for @$list;
@@ -58,11 +58,11 @@ sub listing_ {
div_ class => 'mainbox charbgrid', sub {
my($w,$h) = (160,200);
div_ sub {
- a_ href => "/c$_->{id}", title => $_->{original}||$_->{name}, $_->{name};
+ a_ href => "/$_->{id}", title => $_->{original}||$_->{name}, $_->{name};
div_ sub {
if($_->{image}) {
my($iw,$ih) = imgsize $_->{image}{width}*100, $_->{image}{height}*100, $w, $h;
- image_ $_->{image}, alt => $_->{name}, width => $iw, height => $ih, url => "/c$_->{id}";
+ image_ $_->{image}, alt => $_->{name}, width => $iw, height => $ih, url => "/$_->{id}";
} else {
txt_ 'no image';
}