Add the ability to delete a ticket watcher

This commit is contained in:
johnnyq
2023-12-27 17:21:17 -05:00
parent a9d49c9785
commit a9dfc0d5fe
2 changed files with 20 additions and 0 deletions

View File

@@ -278,6 +278,21 @@ if (isset($_POST['edit_ticket_watchers'])) {
}
if (isset($_GET['delete_ticket_watcher'])) {
validateTechRole();
$watcher_id = intval($_GET['delete_ticket_watcher']);
mysqli_query($mysqli,"DELETE FROM ticket_watchers WHERE watcher_id = $watcher_id");
$_SESSION['alert_message'] = "You <b>removed</b> a ticket watcher";
header("Location: " . $_SERVER["HTTP_REFERER"]);
}
if (isset($_POST['edit_ticket_asset'])) {
validateTechRole();