summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2022-09-28 10:40:41 +0200
committerYorhel <git@yorhel.nl>2022-09-28 10:40:41 +0200
commitb9a1e750bd0de87c6d303eb5c66d0f817729f40a (patch)
treea1e9ad325e3d5e47e9b1f6b3f6ead93c2c4cca55 /lib
parentdaaf247f30a6003b4323611ed3445cc82675cf51 (diff)
Chars::Page: Fix 500 on character pages
Diffstat (limited to 'lib')
-rw-r--r--lib/VNWeb/Chars/Page.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/VNWeb/Chars/Page.pm b/lib/VNWeb/Chars/Page.pm
index 2c8dc24c..34454963 100644
--- a/lib/VNWeb/Chars/Page.pm
+++ b/lib/VNWeb/Chars/Page.pm
@@ -34,7 +34,7 @@ sub enrich_item {
enrich_image_obj image => $c;
enrich_merge vid => 'SELECT id AS vid, title, alttitle, c_released AS vn_released FROM vnt WHERE id IN', $c->{vns};
- enrich_merge rid => 'SELECT id AS rid, title AS rtitle, original AS roriginal, released AS rel_released FROM releases WHERE id IN', grep $_->{rid}, $c->{vns}->@*;
+ enrich_merge rid => 'SELECT id AS rid, title AS rtitle, alttitle AS ralttitle, released AS rel_released FROM releasest WHERE id IN', grep $_->{rid}, $c->{vns}->@*;
# Even with trait overrides, we'll want to see the raw data in revision diffs,
# so fetch the raw spoil as a separate column and do filtering/processing later.
@@ -64,10 +64,10 @@ sub fetch_chars {
');
enrich vns => id => id => sub { sql '
- SELECT cv.id, cv.vid, cv.rid, cv.spoil, cv.role, v.title, v.alttitle, r.title AS rtitle, r.original AS roriginal
+ SELECT cv.id, cv.vid, cv.rid, cv.spoil, cv.role, v.title, v.alttitle, r.title AS rtitle, r.alttitle AS ralttitle
FROM chars_vns cv
JOIN vnt v ON v.id = cv.vid
- LEFT JOIN releases r ON r.id = cv.rid
+ LEFT JOIN releasest r ON r.id = cv.rid
WHERE cv.id IN', $_, $vid ? ('AND cv.vid =', \$vid) : (), '
ORDER BY v.title, cv.vid, cv.rid NULLS LAST'
}, $l;
@@ -219,7 +219,7 @@ sub chartable_ {
txt_ $CHAR_ROLE{$_->{role}}{txt}.' - ';
if($_->{rid}) {
b_ class => 'grayedout', "$_->{rid}:";
- a_ href => "/$_->{rid}", title => $_->{roriginal}||$_->{rtitle}, $_->{rtitle};
+ a_ href => "/$_->{rid}", title => $_->{ralttitle}||$_->{rtitle}, $_->{rtitle};
} else {
txt_ 'All other releases';
}