Reverses partial changes commited in PR #63

- Removes not needed re-translation of statuses. These fails to be
  translated due to index.php calling config.php after performing
  the translation. See #64 for details

- Amend SQL query to use named fields to prevent potential failure
  in future upgrades if table should change.
This commit is contained in:
Thomas Nilsen 2018-11-25 18:26:30 +01:00
parent b5c5a2c8cf
commit 528cb77952

View File

@ -71,7 +71,7 @@ class Service implements JsonSerializable
{
global $mysqli;
$name = $_POST['service'];
$stmt = $mysqli->prepare("INSERT INTO services VALUES(NULL,?)");
$stmt = $mysqli->prepare("INSERT INTO services ( name ) VALUES ( ? )");
$stmt->bind_param("s", $name);
$stmt->execute();
$stmt->get_result();
@ -146,9 +146,9 @@ class Service implements JsonSerializable
if ($statuses[$worst] == count($array))
{
echo _($all[$worst]);
echo $all[$worst];
}else{
echo _($some[$worst]);
echo $some[$worst];
}
echo '</div>';
}