RAWeb
RAWeb copied to clipboard
Global ranking: wrong rank for first row
Description On Global Ranking page, when using pagination, the first row shows the rank of the player on hardcore points ranking instead of the selected ranking.
To Reproduce
- Go to 'Global Ranking' page
- Stay on 'All Time' type
- Select any ranking (sort) other than 'Hardcore Points' and 'Softcore Points'
- From the code, I believe the option 'All Users' must be selected, but I don't have enough followed users to check
- Go to next page(s), the first row shows the rank by points
Expected behavior All rows ranked according to the same logic.
Screenshots
Additional context Seems to be a consequence of #1328 which handles tied ranks. The function getUserRank, used to retrieve the rank for the first row, only handles Points (hardcore, softcore or "retro"), and the call in globalRanking.php (l.238 on current master) only use the first two anyway.