mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
Automatically set selected current one on highscores filters
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user