better formating, didn't change the code nor bring anything to it (aka useless commit)

This commit is contained in:
Louis Vallat 2019-11-17 17:00:54 +01:00
parent fc91f7697c
commit 6491b7d6bd
2 changed files with 13 additions and 4 deletions

View File

@ -27,7 +27,11 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit"])) {
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit_completed"])) { if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit_completed"])) {
if (isset($_POST["name"]) && isset($_POST["description"])) { if (isset($_POST["name"]) && isset($_POST["description"])) {
if (!update_cupboard($_POST["edit_completed"], $_POST["name"], $_POST["description"])) { if (!update_cupboard(
$_POST["edit_completed"],
$_POST["name"],
$_POST["description"]
)) {
$erreur = "<p>Something went wrong. Try again later.</p>"; $erreur = "<p>Something went wrong. Try again later.</p>";
} }
} else { } else {

View File

@ -28,7 +28,12 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit"])) {
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit_completed"])) { if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["edit_completed"])) {
if (isset($_POST["name"]) && isset($_POST["description"]) && isset($_POST["expiration"])) { if (isset($_POST["name"]) && isset($_POST["description"]) && isset($_POST["expiration"])) {
if (!update_product($_POST["edit_completed"], $_POST["name"], $_POST["description"], empty(trim($_POST["expiration"])) ? null : $_POST["expiration"])) { if (!update_product(
$_POST["edit_completed"],
$_POST["name"],
$_POST["description"],
empty(trim($_POST["expiration"])) ? null : $_POST["expiration"]
)) {
$erreur = "<p>Something went wrong. Try again later.</p>"; $erreur = "<p>Something went wrong. Try again later.</p>";
} }
} else { } else {