summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-01-03 10:47:08 +0100
committerYorhel <git@yorhel.nl>2011-01-03 10:47:08 +0100
commit5894b1f62abbe8837067bdf34a559d78e0a5f3a5 (patch)
tree244131799444c98aa5ab27429a47f1a1318e9787
parent5e339cadbec0f2eba02b85fddcc939f3d3330ba1 (diff)
Bugfix: Secondary order by title or username on vote listings
-rw-r--r--ChangeLog1
-rw-r--r--lib/VNDB/DB/ULists.pm2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c48d256..a3c35c37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
- Bugfix: Correctly randomize screenshots on homepage with filters
- Bugfix: Don't show NSFW screenshots on homepage with filters
- Bugfix-API: Use ~ for the get vn search filter instead of =
+ - Bugfix: Secondary order by title or username on vote listings
2.16 - 2011-01-02
- VNDBUtil::bb2html(): Fixed bug when the string starts with a VNDBID
diff --git a/lib/VNDB/DB/ULists.pm b/lib/VNDB/DB/ULists.pm
index e6b6419a..a47e848e 100644
--- a/lib/VNDB/DB/ULists.pm
+++ b/lib/VNDB/DB/ULists.pm
@@ -218,7 +218,7 @@ sub dbVoteGet {
date => 'n.date %s',
username => 'u.username %s',
title => 'vr.title %s',
- vote => 'n.vote %s',
+ vote => 'n.vote %s'.($o{what} =~ /vn/ ? ', vr.title ASC' : $o{what} =~ /user/ ? ', u.username ASC' : ''),
}->{$o{sort}}, $o{reverse} ? 'DESC' : 'ASC';
my($r, $np) = $self->dbPage(\%o, q|