Fix highscores if there is only 1 record

This commit is contained in:
slawkens 2023-07-19 11:57:26 +02:00
parent 714476bf29
commit ddb093ec48
2 changed files with 1 additions and 2 deletions

View File

@ -311,7 +311,6 @@ if(config('highscores_balance'))
/** @var Twig\Environment $twig */ /** @var Twig\Environment $twig */
$twig->display('highscores.html.twig', [ $twig->display('highscores.html.twig', [
'highscores' => $highscores, 'highscores' => $highscores,
'totalRows' => $i - 1,
'list' => $list, 'list' => $list,
'skill' => $skill, 'skill' => $skill,
'skillName' => ($skill == SKILL_FRAGS ? 'Frags' : ($skill == SKILL_BALANCE ? 'Balance' : getSkillName($skill))), 'skillName' => ($skill == SKILL_FRAGS ? 'Frags' : ($skill == SKILL_BALANCE ? 'Balance' : getSkillName($skill))),

View File

@ -48,7 +48,7 @@
{% endif %} {% endif %}
</tr> </tr>
{% if totalRows < 1 %} {% if highscores|length < 1 %}
<tr bgcolor="{{ config('darkborder') }}"><td colspan="100%">No records yet.</td></tr> <tr bgcolor="{{ config('darkborder') }}"><td colspan="100%">No records yet.</td></tr>
{% else %} {% else %}
{% set row = 0 %} {% set row = 0 %}