Commit e96227f 1 parent c49c9d9 commit e96227f Copy full SHA for e96227f
File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 35
35
$ configVocations = config ('vocations ' );
36
36
$ configVocationsAmount = config ('vocations_amount ' );
37
37
38
- if ( $ settingHighscoresVocationBox && $ vocation !== ' all ' )
39
- {
38
+ $ vocationId = null ;
39
+ if ( $ settingHighscoresVocationBox && $ vocation !== ' all ' ) {
40
40
foreach ($ configVocations as $ id => $ name ) {
41
41
if (strtolower ($ name ) == $ vocation ) {
42
- $ add_vocs = array ($ id );
42
+ $ vocationId = $ id ;
43
+ $ add_vocs = [$ id ];
43
44
44
45
$ i = $ id + $ configVocationsAmount ;
45
46
while (isset ($ configVocations [$ i ])) {
287
288
'skillName ' => ($ skill == SKILL_FRAGS ? 'Frags ' : ($ skill == SKILL_BALANCE ? 'Balance ' : getSkillName ($ skill ))),
288
289
'levelName ' => ($ skill != SKILL_FRAGS && $ skill != SKILL_BALANCE ? 'Level ' : ($ skill == SKILL_BALANCE ? 'Balance ' : 'Frags ' )),
289
290
'vocation ' => $ vocation !== 'all ' ? $ vocation : null ,
291
+ 'vocationId ' => $ vocationId ,
290
292
'types ' => $ types ,
291
293
'linkPreviousPage ' => $ linkPreviousPage ,
292
294
'linkNextPage ' => $ linkNextPage ,
Original file line number Diff line number Diff line change 11
11
<select onchange =" location = this.value;" aria-label =" skillFilter" id =" skillFilter" >
12
12
{% set i = 0 %}
13
13
{% for link , name in types %}
14
- <option value =" {{ getLink(' highscores' ) }}/{{ link }}{% if vocation is not null %}{{ vocation }}{% endif %}" class =" size_xs" >{{ name }}</option >
14
+ <option value =" {{ getLink(' highscores' ) }}/{{ link }}/ {% if vocation is not null %}{{ vocation }}{% endif %}" class =" size_xs" {% if list is not null and list == link %} selected {% endif %} >{{ name }}</option >
15
15
{% endfor %}
16
16
</select >
17
17
</td >
21
21
<option value =" {{ getLink(' highscores' ) }}/{{ list }}" class =" size_xs" >[ALL]</option >
22
22
{% set i = 0 %}
23
23
{% for i in 1 .. config.vocations_amount %}
24
- <option value =" {{ getLink(' highscores' ) }}/{{ list }}/{{ config .vocations [i ]| lower }}" class =" size_xs" >{{ config .vocations [i ]}}</option >
24
+ <option value =" {{ getLink(' highscores' ) }}/{{ list }}/{{ config .vocations [i ]| lower }}" class =" size_xs" {% if vocationId is not null and vocationId == i %} selected {% endif %} >{{ config .vocations [i ]}}</option >
25
25
{% endfor %}
26
26
</select >
27
27
</td >
You can’t perform that action at this time.
0 commit comments