Skip to content

Commit 505811b

Browse files
committed
Merge branch '3.3.x'
2 parents 256528b + 5478aff commit 505811b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

memberlist.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,10 +1385,10 @@
13851385

13861386
$order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
13871387

1388-
// Unfortunately we must do this here for sorting by rank, else the sort order is applied wrongly
1389-
if ($sort_key == 'm')
1388+
// For sorting by non-unique columns (rank, posts) add unique sort key to avoid duplicated rows in results
1389+
if ($sort_key == 'm' || $sort_key == 'd')
13901390
{
1391-
$order_by .= ', u.user_posts DESC';
1391+
$order_by .= ', u.user_id ASC';
13921392
}
13931393

13941394
/**

0 commit comments

Comments
 (0)