aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/memberlist.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r--phpBB/memberlist.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index dc74290fad..bfa4e6eceb 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -894,7 +894,7 @@ switch ($mode)
{
$sort_key_sql['l'] = 'u.user_lastvisit';
}
- $sort_key_sql['m'] = 'u.user_rank DESC, u.user_posts';
+ $sort_key_sql['m'] = 'u.user_rank';
$sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
@@ -1154,6 +1154,12 @@ switch ($mode)
$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
+ if ($sort_key == 'm')
+ {
+ $order_by .= ', u.user_posts DESC';
+ }
+
// Count the users ...
if ($sql_where)
{