Instead of using a random secondary order, sort by the ID of the last
vote first, then by user name.

Signed-off-by: Lukas Fleischer <[email protected]>
---
 web/lib/acctfuncs.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index b4081b5..aee56e2 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -1007,7 +1007,7 @@ function last_votes_list() {
        $q .= "TU_VoteInfo, Users WHERE TU_VoteInfo.ID = TU_Votes.VoteID AND ";
        $q .= "TU_VoteInfo.End < UNIX_TIMESTAMP() AND ";
        $q .= "Users.ID = TU_Votes.UserID AND Users.AccountTypeID = 2 ";
-       $q .= "GROUP BY UserID ORDER BY LastVote DESC";
+       $q .= "GROUP BY UserID ORDER BY LastVote DESC, UserName ASC";
        $result = $dbh->query($q);
 
        $details = array();
-- 
1.8.5.3

Reply via email to