From b889bd9329083e30fd078a86cc6046067191b596 Mon Sep 17 00:00:00 2001 From: kremsy Date: Fri, 31 Jan 2014 19:32:50 +0100 Subject: [PATCH] small fix --- application/core/Statistics/StatisticManager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/core/Statistics/StatisticManager.php b/application/core/Statistics/StatisticManager.php index 6590eed8..ca51a736 100644 --- a/application/core/Statistics/StatisticManager.php +++ b/application/core/Statistics/StatisticManager.php @@ -105,7 +105,7 @@ class StatisticManager { $mysqli = $this->maniaControl->database->mysqli; $statId = $this->getStatId($statName); - $query = "SELECT playerId, serverIndex, value FROM `" . self::TABLE_STATISTICS . "` WHERE statId = " . $statId . " ORDER BY value DESC;"; + $query = "SELECT playerId, serverIndex, value FROM `" . self::TABLE_STATISTICS . "` WHERE statId = " . $statId . " ORDER BY value DESC LIMIT 100;"; $result = $mysqli->query($query); if (!$result) { @@ -126,6 +126,7 @@ class StatisticManager { } } + arsort($stats); $result->close(); return $stats; }