summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB
diff options
context:
space:
mode:
authormorkt <>2015-01-17 10:32:45 +0100
committerYorhel <git@yorhel.nl>2015-01-17 10:32:45 +0100
commit9426bf6f7ffdea07fe354cc7eda38843226e36c2 (patch)
tree1591722f47027c047e3494506687c5225f28c6ee /lib/VNDB/DB
parent33840a99712a157dd07887648fc4b10226a6dc84 (diff)
Fix bug with language icon not being displayed for release in user list
This happened when a release was linked to multiple visual novel entries, the language icon would show on one VN but not on the other.
Diffstat (limited to 'lib/VNDB/DB')
-rw-r--r--lib/VNDB/DB/ULists.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/VNDB/DB/ULists.pm b/lib/VNDB/DB/ULists.pm
index a0cf4f18..6831e579 100644
--- a/lib/VNDB/DB/ULists.pm
+++ b/lib/VNDB/DB/ULists.pm
@@ -101,18 +101,17 @@ sub dbVNListList {
);
if(@$rel) {
- my %rel = map {
- $_->{languages}=[];
- $_->{latest}, $_->{languages}
- } @$rel;
-
+ my %rel = map { $_->{latest} => [] } @$rel;
push(@{$rel{$_->{rid}}}, $_->{lang}) for (@{$self->dbAll(q|
SELECT rid, lang
FROM releases_lang
WHERE rid IN(!l)|,
[ keys %rel ]
)});
- push @{$vns{$_->{vid}}}, $_ for @$rel;
+ for(@$rel) {
+ $_->{languages} = $rel{$_->{latest}};
+ push @{$vns{$_->{vid}}}, $_;
+ }
}
}