mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fix for othire not finding lookaddons column
This commit is contained in:
parent
668387e372
commit
fba9f66a1f
@ -1004,7 +1004,7 @@ function getTopPlayers($limit = 5) {
|
|||||||
$deleted = 'deletion';
|
$deleted = 'deletion';
|
||||||
|
|
||||||
$is_tfs10 = $db->hasTable('players_online');
|
$is_tfs10 = $db->hasTable('players_online');
|
||||||
$players = $db->query('SELECT `id`, `name`, `level`, `experience`, `looktype`, `lookaddons`, `lookhead`, `lookbody`, `looklegs`, `lookfeet`' . ($is_tfs10 ? '' : ', `online`') . ' FROM `players` WHERE `group_id` < ' . config('highscores_groups_hidden') . ' AND `id` NOT IN (' . implode(', ', config('highscores_ids_hidden')) . ') AND `' . $deleted . '` = 0 AND `account_id` != 1 ORDER BY `experience` DESC LIMIT ' . (int)$limit)->fetchAll();
|
$players = $db->query('SELECT `id`, `name`, `level`, `experience`, `looktype`' . ($db->hasColumn('players', 'lookaddons') ? ', `lookaddons`' : '') . ', `lookhead`, `lookbody`, `looklegs`, `lookfeet`' . ($is_tfs10 ? '' : ', `online`') . ' FROM `players` WHERE `group_id` < ' . config('highscores_groups_hidden') . ' AND `id` NOT IN (' . implode(', ', config('highscores_ids_hidden')) . ') AND `' . $deleted . '` = 0 AND `account_id` != 1 ORDER BY `experience` DESC LIMIT ' . (int)$limit)->fetchAll();
|
||||||
|
|
||||||
if($is_tfs10) {
|
if($is_tfs10) {
|
||||||
foreach($players as &$player) {
|
foreach($players as &$player) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user