summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2022-09-27 08:25:27 +0200
committerYorhel <git@yorhel.nl>2022-09-28 09:35:55 +0200
commitdd775389806f79b91f6ef1419a1a91c8616ec621 (patch)
tree5c3c73742bbca284667d0868b6cf8be17d63987c /lib
parent3ec6f29b4e11d29afd0f72a5dd1ef42fb4f22485 (diff)
Fix bug in releases_by_vn() + alternate release title sorting
Diffstat (limited to 'lib')
-rw-r--r--lib/VNWeb/Releases/Lib.pm2
-rw-r--r--lib/VNWeb/Releases/List.pm4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/VNWeb/Releases/Lib.pm b/lib/VNWeb/Releases/Lib.pm
index a76c8d4b..0b899bb5 100644
--- a/lib/VNWeb/Releases/Lib.pm
+++ b/lib/VNWeb/Releases/Lib.pm
@@ -18,7 +18,7 @@ sub enrich_release_elm {
# Return the list of releases associated with a VN in the format suitable as 'Releases' Elm response.
sub releases_by_vn {
my($id) = @_;
- my $l = tuwf->dbAlli('SELECT r.id, rv.rtype FROM releases r JOIN releases_vn rv ON rv.id = r.id WHERE NOT r.hidden AND rv.vid =', \$id, 'ORDER BY r.released, r.title, r.id');
+ my $l = tuwf->dbAlli('SELECT r.id, rv.rtype FROM releasest r JOIN releases_vn rv ON rv.id = r.id WHERE NOT r.hidden AND rv.vid =', \$id, 'ORDER BY r.released, r.sorttitle, r.id');
enrich_release_elm $l;
$l
}
diff --git a/lib/VNWeb/Releases/List.pm b/lib/VNWeb/Releases/List.pm
index 2e25a04d..8244ab16 100644
--- a/lib/VNWeb/Releases/List.pm
+++ b/lib/VNWeb/Releases/List.pm
@@ -66,8 +66,8 @@ TUWF::get qr{/r}, sub {
WHERE', $where, '
ORDER BY', sprintf {
title => 'r.sorttitle %s, r.released %1$s',
- minage => 'r.minage %s, r.title %1$s, r.released %1$s',
- released => 'r.released %s, r.title %1$s, r.id %1$s',
+ minage => 'r.minage %s, r.sorttitle %1$s, r.released %1$s',
+ released => 'r.released %s, r.sorttitle %1$s, r.id %1$s',
}->{$opt->{s}}, $opt->{o} eq 'a' ? 'ASC' : 'DESC'
) : [];
} || (($count, $list) = (undef, []));