This commit is contained in:
kremsy 2014-02-13 19:31:29 +01:00 committed by Steffen Schröder
parent f6d7bb3d88
commit d7c26d04ae

View File

@ -210,10 +210,15 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener {
$requiredRecords = $this->maniaControl->settingManager->getSetting($this, self::SETTING_MIN_REQUIRED_RECORDS);
$maxRecords = $this->maniaControl->settingManager->getSetting($this, self::SETTING_MAX_STORED_RECORDS);
//FIXME requiredrecords = NULL
$requiredRecords = 3;
$query = 'SELECT playerIndex, COUNT(*) AS Cnt
FROM ' . LocalRecordsPlugin::TABLE_RECORDS . '
GROUP BY PlayerId
GROUP BY PlayerIndex
HAVING Cnt >=' . $requiredRecords;
$result = $mysqli->query($query);
$players = array();
while($row = $result->fetch_object()) {