diff --git a/system/pages/highscores.php b/system/pages/highscores.php index b52e7316..bba1dff6 100644 --- a/system/pages/highscores.php +++ b/system/pages/highscores.php @@ -35,11 +35,12 @@ $settingHighscoresVocationBox = setting('core.highscores_vocation_box'); $configVocations = config('vocations'); $configVocationsAmount = config('vocations_amount'); -if($settingHighscoresVocationBox && $vocation !== 'all') -{ +$vocationId = null; +if($settingHighscoresVocationBox && $vocation !== 'all') { foreach($configVocations as $id => $name) { if(strtolower($name) == $vocation) { - $add_vocs = array($id); + $vocationId = $id; + $add_vocs = [$id]; $i = $id + $configVocationsAmount; while(isset($configVocations[$i])) { @@ -287,6 +288,7 @@ $twig->display('highscores.html.twig', [ 'skillName' => ($skill == SKILL_FRAGS ? 'Frags' : ($skill == SKILL_BALANCE ? 'Balance' : getSkillName($skill))), 'levelName' => ($skill != SKILL_FRAGS && $skill != SKILL_BALANCE ? 'Level' : ($skill == SKILL_BALANCE ? 'Balance' : 'Frags')), 'vocation' => $vocation !== 'all' ? $vocation : null, + 'vocationId' => $vocationId, 'types' => $types, 'linkPreviousPage' => $linkPreviousPage, 'linkNextPage' => $linkNextPage, diff --git a/system/templates/highscores.html.twig b/system/templates/highscores.html.twig index 8a2c78a6..711264dd 100644 --- a/system/templates/highscores.html.twig +++ b/system/templates/highscores.html.twig @@ -11,7 +11,7 @@ @@ -21,7 +21,7 @@ {% set i = 0 %} {% for i in 1..config.vocations_amount %} - + {% endfor %}