diff --git a/app/public/actions/close.php b/app/public/actions/close.php index 4e9bc4a..318e004 100644 --- a/app/public/actions/close.php +++ b/app/public/actions/close.php @@ -10,9 +10,9 @@ if ($is_authorised == true) { if($_SERVER['REQUEST_METHOD'] == 'POST') { try { - $stmt = "UPDATE tickets SET status= 5 WHERE uuid=:uuid"; + $stmt = "UPDATE tickets SET status='Closed' WHERE uuid=:uuid"; $sql = $db->prepare($stmt); - $sql->bindParam(':uuid', $request['uuid']); + $sql->bindParam(':uuid', $_GET['rid']); $sql->execute(); } catch (PDOException $e) { $alert = array("danger", "Failed to close request: " . $e->getMessage()); diff --git a/app/public/existing.php b/app/public/existing.php index 04c7341..e079b73 100644 --- a/app/public/existing.php +++ b/app/public/existing.php @@ -7,7 +7,7 @@ $closed_requests = array(); $subscriptions = get_subscribed_requests($db); - $requests = get_my_requests($db); + $requests = get_my_open_requests($db); foreach($requests as $req) { if ($req['status'] != "Closed") {