summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormorkt <>2015-02-07 08:30:55 +0100
committerYorhel <git@yorhel.nl>2015-02-07 08:30:55 +0100
commit5cec32d98f108c570dc252ecfe6be76cc33a42de (patch)
treefe83025a13eae377b6c49f8f518091686d365e2e /lib
parente311da013d5ece918723de43916a9ce91a0f6fd1 (diff)
Handler::VNPage: Fix ordering of staff/cast on revision page
Diffstat (limited to 'lib')
-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 fbaf00d7..894f9534 100644
--- a/lib/VNDB/Handler/VNPage.pm
+++ b/lib/VNDB/Handler/VNPage.pm
@@ -710,8 +710,10 @@ sub _revision {
$_[0] ? sprintf '<a href="http://renai.us/game/%s.shtml">%1$s</a>', xml_escape $_[0] : mt '_revision_nolink'
}],
[ credits => join => '<br />', split => sub {
- my @r = map sprintf('<a href="/s%d" title="%s">%s</a> [%s]%s',
- $_->{id}, xml_escape($_->{original}||$_->{name}), xml_escape($_->{name}), mt("_credit_$_->{role}"), $_->{note} ? ' ['.xml_escape($_->{note}).']' : ''), sort { $a->{id} <=> $b->{id} } @{$_[0]};
+ my @r = map sprintf('<a href="/s%d" title="%s">%s</a> [%s]%s', $_->{id},
+ xml_escape($_->{original}||$_->{name}), xml_escape($_->{name}), mt("_credit_$_->{role}"),
+ $_->{note} ? ' ['.xml_escape($_->{note}).']' : ''),
+ sort { $a->{id} <=> $b->{id} || $a->{role} cmp $b->{role} } @{$_[0]};
return @r ? @r : (mt '_revision_empty');
}],
[ seiyuu => join => '<br />', split => sub {
@@ -719,7 +721,7 @@ sub _revision {
$_->{id}, xml_escape($_->{original}||$_->{name}), xml_escape($_->{name}),
mt('_staff_as', xml_escape($_->{cname})),
$_->{note} ? ' ['.xml_escape($_->{note}).']' : ''),
- sort { $a->{id} <=> $b->{id} } @{$_[0]};
+ sort { $a->{id} <=> $b->{id} || $a->{cid} <=> $b->{cid} || $a->{note} cmp $b->{note} } @{$_[0]};
return @r ? @r : (mt '_revision_empty');
}],
[ relations => join => '<br />', split => sub {