File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -433,9 +433,8 @@ private function getPlayedBeatmapIds(?array $rank = null)
433
433
}
434
434
435
435
$ topScores = [];
436
- $ scoreField = ScoreSearchParams::showLegacyForUser ($ this ->params ->user )
437
- ? 'legacy_total_score '
438
- : 'total_score ' ;
436
+ $ showLegacyOnly = ScoreSearchParams::showLegacyForUser ($ this ->params ->user ) ?? false ;
437
+ $ scoreField = $ showLegacyOnly ? 'legacy_total_score ' : 'total_score ' ;
439
438
foreach ($ query ->get () as $ score ) {
440
439
$ prevScore = $ topScores [$ score ->beatmap_id ] ?? null ;
441
440
@@ -445,6 +444,12 @@ private function getPlayedBeatmapIds(?array $rank = null)
445
444
}
446
445
}
447
446
447
+ if ($ showLegacyOnly ) {
448
+ foreach ($ topScores as $ beatmapId => $ score ) {
449
+ $ topScores [$ beatmapId ] = $ score ->makeLegacyEntry ();
450
+ }
451
+ }
452
+
448
453
$ ret = [];
449
454
$ rankSet = new Set ($ rank );
450
455
foreach ($ topScores as $ beatmapId => $ score ) {
You can’t perform that action at this time.
0 commit comments