Some small fixes

This commit is contained in:
whiteblXK
2019-04-16 13:37:10 +02:00
parent 13199744ef
commit 5aaf15f81c
3 changed files with 7 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ else {
'id' => $players_deaths_count,
'date' => $death['date'],
'killers_string' => $killers_string,
'world_id' => $config['worlds'][(int)$death['world_id']]
'world_id' => isset($config['worlds'][(int)$death['world_id']]) ? $config['worlds'][(int)$death['world_id']] : null,
);
}
}

View File

@@ -74,10 +74,14 @@ else if(isset($config['lua']['black_skull_duration'])) {
$blackSkull = true;
}
$clientVersion = NULL;
if(isset($status['online']))
$clientVersion = isset($status['clientVersion']) ? $status['clientVersion'] : null;
$twig->display('serverinfo.html.twig', array(
'experienceStages' => isset($config['lua']['experienceStages']) && getBoolean($config['lua']['experienceStages']) ? $config['lua']['experienceStages'] : null,
'serverIp' => str_replace('/', '', str_replace('http://', '', $config['lua']['url'])),
'clientVersion' => isset($status['online']) ? $status['clientVersion'] : null,
'clientVersion' => $clientVersion,
'globalSaveHour' => isset($config['lua']['globalSaveEnabled']) && getBoolean($config['lua']['globalSaveEnabled']) ? $config['lua']['globalSaveHour'] : null,
'protectionLevel' => $config['lua']['protectionLevel'],
'houseRent' => $rent == 'never' ? 'disabled' : $rent,