Fixed displaying players in Highscores. Some players in Top Players widget will be hidden when theirs group_id is higher than specified in config("config.highscore.ignoreGroupId - Ignore group id higher than this (staff)"). Same in Highscore subpage. Also fixed undefined index page in Highscore. This resolves #43 issue.

This commit is contained in:
Kuzirashi
2014-04-20 15:08:30 +02:00
parent b0e40e4ccd
commit bafb639506
3 changed files with 20 additions and 20 deletions

View File

@@ -4,7 +4,7 @@
$cache = new Cache('engine/cache/topPlayer');
if ($cache->hasExpired()) {
$players = mysql_select_multi("SELECT `name`, `level`, `experience` FROM `players` ORDER BY `experience` DESC LIMIT 5;");
$players = mysql_select_multi('SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` <= ' . $config['highscore']['ignoreGroupId'] . ' ORDER BY `experience` DESC LIMIT 5;');
$cache->setContent($players);
$cache->save();