Skip to content

Commit

Permalink
Add none vocation to highscores
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed Oct 10, 2024
1 parent 317505b commit 7f47376
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions system/pages/highscores.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
if(strtolower($name) == $vocation) {
$add_vocs = array($id);

$i = $id + $config['vocations_amount'];
while(isset($config['vocations'][$i])) {
$add_vocs[] = $i;
$i += $config['vocations_amount'];
if ($id !== 0) {
$i = $id + $config['vocations_amount'];
while(isset($config['vocations'][$i])) {
$add_vocs[] = $i;
$i += $config['vocations_amount'];
}
}

$add_sql = 'AND `vocation` IN (' . implode(', ', $add_vocs) . ')';
Expand Down Expand Up @@ -355,7 +357,7 @@
<tr bgcolor="'.$config['lightborder'].'">
<td>
<a href="' . getLink('highscores') . '/' . $list . '" class="size_xs">[ALL]</A><BR>';
for($i = 1; $i <= $config['vocations_amount']; $i++) {
for($i = 0; $i <= $config['vocations_amount']; $i++) {
echo '<a href="' . getLink('highscores') . '/' . $list . '/' . strtolower($config_vocations[$i]) . '" class="size_xs">' . $config_vocations[$i] . '</a><br/>';
}
echo '
Expand Down

0 comments on commit 7f47376

Please sign in to comment.