🐛 Fix request closure problem (#62)

Signed-off-by: Luke Tainton <luke@tainton.uk>
This commit was merged in pull request #62.
This commit is contained in:
2020-08-10 15:24:29 +01:00
committed by GitHub
parent d7f9678fd6
commit b89cf56ce9

View File

@@ -8,7 +8,6 @@
// Close request // Close request
if ($is_authorised == true) { if ($is_authorised == true) {
if($_SERVER['REQUEST_METHOD'] == 'POST') {
try { try {
$stmt = "UPDATE tickets SET status='Closed' WHERE uuid=:uuid"; $stmt = "UPDATE tickets SET status='Closed' WHERE uuid=:uuid";
$sql = $db->prepare($stmt); $sql = $db->prepare($stmt);
@@ -17,7 +16,6 @@
} catch (PDOException $e) { } catch (PDOException $e) {
$alert = array("danger", "Failed to close request: " . $e->getMessage()); $alert = array("danger", "Failed to close request: " . $e->getMessage());
} }
}
$newURL = "/"; $newURL = "/";
echo("<script>window.location = '$newURL'</script>"); echo("<script>window.location = '$newURL'</script>");
} else { } else {