mirror of
https://github.com/slawkens/myaac.git
synced 2026-04-25 11:53:31 +02:00
Highscores: Prevent mass queries amount caused by getPlayerLink
This commit is contained in:
@@ -214,6 +214,7 @@ if (empty($highscores)) {
|
|||||||
$tmp['online'] = $row->online_status;
|
$tmp['online'] = $row->online_status;
|
||||||
$tmp['vocation'] = $row->vocation_name;
|
$tmp['vocation'] = $row->vocation_name;
|
||||||
$tmp['outfit_url'] = $row->outfit_url; // @phpstan-ignore-line
|
$tmp['outfit_url'] = $row->outfit_url; // @phpstan-ignore-line
|
||||||
|
$tmp['link'] = getPlayerLink($row->name, false);
|
||||||
unset($tmp['online_table']);
|
unset($tmp['online_table']);
|
||||||
|
|
||||||
return $tmp;
|
return $tmp;
|
||||||
@@ -247,7 +248,6 @@ foreach($highscores as $id => &$player)
|
|||||||
$player['experience'] = number_format($player['experience']);
|
$player['experience'] = number_format($player['experience']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$player['link'] = getPlayerLink($player['name'], false);
|
|
||||||
$player['flag'] = getFlagImage($player['country']);
|
$player['flag'] = getFlagImage($player['country']);
|
||||||
$player['outfit'] = '<img style="position:absolute;margin-top:-50px;margin-left:-30px" src="' . $player['outfit_url'] . '" alt="" />';
|
$player['outfit'] = '<img style="position:absolute;margin-top:-50px;margin-left:-30px" src="' . $player['outfit_url'] . '" alt="" />';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user