From 856d142b3fde706503ec4f7c5737fc4c486e2ef9 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Mon, 10 Aug 2020 17:25:14 +0100 Subject: [PATCH] :bug: Pls work this time Signed-off-by: Luke Tainton --- app/public/actions/delsub.php | 4 +++- app/public/editsub.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/public/actions/delsub.php b/app/public/actions/delsub.php index 244c588..87282da 100644 --- a/app/public/actions/delsub.php +++ b/app/public/actions/delsub.php @@ -6,13 +6,15 @@ $authorised_users = get_subscribers($db, $request); $is_authorised = isAuthorised($_SESSION['uuid'], $authorised_users, $request); + $subs_to_remove = implode(",", $_POST['delSubSelector']); + // Remove subscriber(s) if ($is_authorised == true) { if($_SERVER['REQUEST_METHOD'] == 'POST') { try { $stmt = "DELETE FROM ticket_subscribers WHERE WHERE sub_id IN (:sublist)"; $sql = $db->prepare($stmt); - $sql->bindParam(':sublist', $_POST['delSubSelector']); + $sql->bindParam(':sublist', $subs_to_remove); $sql->execute(); } catch (PDOException $e) { $alert = array("danger", "Failed to remove subscriber(s): " . $e->getMessage()); diff --git a/app/public/editsub.php b/app/public/editsub.php index de96570..4057135 100644 --- a/app/public/editsub.php +++ b/app/public/editsub.php @@ -116,7 +116,7 @@
- " . get_user_name($db, $sub['user_uuid']) . ""); } ?>