Fix label spelling in serverinfo.php

Fix #411
This commit is contained in:
Evil Puncker 2020-05-29 16:42:08 -03:00 committed by GitHub
parent e056898f31
commit ada8e470d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ if (user_logged_in() && is_admin($user_data)) {
$stagesXML = simplexml_load_file("engine/XML/stages.xml"); $stagesXML = simplexml_load_file("engine/XML/stages.xml");
if ($stagesXML !== false) { if ($stagesXML !== false) {
$stagesData = array(); $stagesData = array();
// Load config ( stages enabled or disabled) // Load config (stages enabled or disabled)
if ($config['ServerEngine'] == 'TFS_10') if ($config['ServerEngine'] == 'TFS_10')
foreach ($stagesXML->config->attributes() as $name => $value) foreach ($stagesXML->config->attributes() as $name => $value)
$stagesData["$name"] = "$value"; $stagesData["$name"] = "$value";
@ -146,12 +146,12 @@ if (user_logged_in() && is_admin($user_data)) {
$comment = strpos($rawLua[$i], '--'); $comment = strpos($rawLua[$i], '--');
if ($comment !== false) if ($comment !== false)
$rawLua[$i] = substr($rawLua[$i], 0, $comment); $rawLua[$i] = substr($rawLua[$i], 0, $comment);
$rawLua[$i] = trim($rawLua[$i]); // Remove uneccesary whitespace $rawLua[$i] = trim($rawLua[$i]); // Remove unnecessary whitespace
// If for some reason the line is empty, ignore it. (Could be a "=" symbol inside an inline Lua comment that we sliced away) // If for some reason the line is empty, ignore it. (Could be a "=" symbol inside an inline Lua comment that we sliced away)
if (!empty($rawLua[$i])) { if (!empty($rawLua[$i])) {
// Built a relevant data array // Built a relevant data array
$data = explode('=', $rawLua[$i]); $data = explode('=', $rawLua[$i]);
// Remove uneccesary whitespace // Remove unnecessary whitespace
$data[0] = trim($data[0]); $data[0] = trim($data[0]);
$data[1] = trim($data[1]); $data[1] = trim($data[1]);
// TFS 0.3/4 compatibility // TFS 0.3/4 compatibility
@ -216,8 +216,8 @@ $stages = false;
<table class="table tbl-hover"> <table class="table tbl-hover">
<tbody> <tbody>
<tr class="yellow"> <tr class="yellow">
<td>Minium level</td> <td>Minimum level</td>
<td>Maximun level</td> <td>Maximum level</td>
<td>Multiplier</td> <td>Multiplier</td>
</tr> </tr>
<?php foreach ($stagesData['stages'] as $stage): ?> <?php foreach ($stagesData['stages'] as $stage): ?>
@ -316,7 +316,7 @@ $stages = false;
<?php if ($luaConfig['experienceByKillingPlayers']): ?> <?php if ($luaConfig['experienceByKillingPlayers']): ?>
<tr> <tr>
<td>Experience gain kill treshhold:</td> <td>Experience gain kill threshold:</td>
<td><?php echo $luaConfig['expFromPlayersLevelRange']; ?>% of your level</td> <td><?php echo $luaConfig['expFromPlayersLevelRange']; ?>% of your level</td>
</tr> </tr>
<?php endif; ?> <?php endif; ?>