* some small fix regarding highscores vocation box

This commit is contained in:
slawkens1 2018-01-04 00:28:16 +01:00
parent 6e221fe469
commit 88a320530c

View File

@ -22,11 +22,9 @@ $add_sql = '';
$config_vocations = $config['vocations'];
if($config['highscores_vocation_box'] && isset($vocation))
{
for($i = 1; $i < count($config_vocations) / 2; $i++)
{
if(strtolower($config_vocations[$i]) == $vocation)
{
$add_sql = 'AND ' . $db->fieldName('vocation') . ' = ' . $db->quote($i);
foreach($config['vocations'] as $id => $name) {
if(strtolower($name) == $vocation) {
$add_sql = 'AND ' . $db->fieldName('vocation') . ' = ' . $db->quote($id);
break;
}
}