1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[ticket/17227] Fix rows duplication in memberlist

PHPBB-17227
This commit is contained in:
rxu
2025-01-23 11:15:47 +07:00
parent 2f08d8eb72
commit f9def4a725

View File

@@ -1390,10 +1390,10 @@ switch ($mode)
$order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'); $order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
// Unfortunately we must do this here for sorting by rank, else the sort order is applied wrongly // For sorting by non-unique columns (rank, posts) add unique sort key to avoid duplicated rows in results
if ($sort_key == 'm') if ($sort_key == 'm' || $sort_key == 'd')
{ {
$order_by .= ', u.user_posts DESC'; $order_by .= ', u.user_id ASC';
} }
/** /**