diff --git a/contributions.php b/contributions.php index 31c67fb..69ca575 100644 --- a/contributions.php +++ b/contributions.php @@ -20,12 +20,13 @@ $currentUser = current_user(); $balances = contribution_balances(); $myBalance = contribution_user_balance((int) $currentUser['id']); -// Rang: gleiche Punktzahl = gleicher Platz. +// Rang: gleiche Punktzahl = gleicher Platz, die naechste Punktzahl bekommt den naechsten Platz +// (1, 1, 2 - nicht 1, 1, 3). Genauso zaehlt der Platz im Dashboard. $rank = 0; $lastPoints = null; foreach ($balances as $index => $member) { if ($lastPoints === null || (int) $member['points'] !== $lastPoints) { - $rank = $index + 1; + $rank++; $lastPoints = (int) $member['points']; } $balances[$index]['rank'] = $rank; @@ -156,7 +157,7 @@ include __DIR__ . '/includes/header.php'; 0): ?>

- Angezeigt werden die besten Plätze. Die vollständige Rangliste + Angezeigt werden die besten Mitglieder. Die vollständige Rangliste ( Mitglieder) ist der Legionsleitung vorbehalten.

diff --git a/dashboard.php b/dashboard.php index 62cd86d..480fa94 100644 --- a/dashboard.php +++ b/dashboard.php @@ -53,13 +53,14 @@ if ($canViewRaids) { } $nextRaids = array_slice($upcomingRaids, 0, 3); -// Eigene Lumipunkte mit Platz in der Rangliste (gleiche Punktzahl = gleicher Platz). +// Eigene Lumipunkte mit Platz in der Rangliste (gleiche Punktzahl = gleicher Platz, danach der naechste - +// wie auf contributions.php): 1 + wie viele verschiedene Punktstaende hoeher sind. $myPoints = null; $myRank = null; if ($canViewContributions) { $myPoints = contribution_user_balance((int) $user['id']); $rankStmt = db()->prepare( - "SELECT COUNT(*) + 1 FROM ( + "SELECT COUNT(DISTINCT points) + 1 FROM ( SELECT u.id, COALESCE(SUM(e.points), 0) AS points FROM users u LEFT JOIN contribution_entries e ON e.user_id = u.id WHERE u.status = 'active' GROUP BY u.id diff --git a/includes/patchnotes.php b/includes/patchnotes.php index 6d54043..0d46b78 100644 --- a/includes/patchnotes.php +++ b/includes/patchnotes.php @@ -19,6 +19,15 @@ const PATCHNOTE_TYPES = [ ]; const PATCHNOTES = [ + [ + 'id' => '2026-09-25-j', + 'date' => '2026-09-25', + 'title' => 'Plätze in der Rangliste', + 'summary' => 'Bei Punktgleichstand geht die Rangliste jetzt mit dem nächsten Platz weiter.', + 'changes' => [ + ['type' => 'behoben', 'area' => 'Lumipunkte', 'text' => 'Teilen sich mehrere Mitglieder einen Platz, kommt danach der nächste: Nach zehnmal Platz 1 folgt Platz 2 statt Platz 11. Dein Platz im Dashboard zählt genauso.'], + ], + ], [ 'id' => '2026-09-25-i', 'date' => '2026-09-25',