From baea5ed997cbfecaf69160565983002dfbd44265 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Tue, 5 Sep 2023 13:53:42 -0400 Subject: [PATCH] Fixed issues with ticket notifications --- css/style.css | 3 ++- inc_client_top_head.php | 6 ++---- post/ticket.php | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/css/style.css b/css/style.css index acf444ca..ecd7abce 100644 --- a/css/style.css +++ b/css/style.css @@ -1,3 +1,4 @@ body{ font-size: .875rem; -} \ No newline at end of file +} + diff --git a/inc_client_top_head.php b/inc_client_top_head.php index 425b40d0..bda60f82 100644 --- a/inc_client_top_head.php +++ b/inc_client_top_head.php @@ -2,7 +2,7 @@
-

+

@@ -32,9 +32,7 @@
-
- - +
diff --git a/post/ticket.php b/post/ticket.php index f2349e02..453204d3 100644 --- a/post/ticket.php +++ b/post/ticket.php @@ -218,7 +218,7 @@ if (isset($_POST['assign_ticket'])) { // Notification - if (intval($session_user_id) !== $assigned_to || $assigned_to !== 0) { + if ($session_user_id != $assigned_to && $assigned_to != 0) { // App Notification mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Ticket', notification = 'Ticket $ticket_prefix_escaped$ticket_number - Subject: $ticket_subject_escaped has been assigned to you by $session_name', notification_client_id = $client_id, notification_user_id = $assigned_to"); @@ -392,13 +392,13 @@ if (isset($_POST['add_ticket_reply'])) { //End Mail IF // Notification for assigned ticket user - if (intval($session_user_id) !== $ticket_assigned_to || $ticket_assigned_to !== 0) { + if ($session_user_id != $ticket_assigned_to && $ticket_assigned_to != 0) { mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Ticket', notification = '$session_name updated Ticket $ticket_prefix_escaped$ticket_number - Subject: $ticket_subject_escaped that is assigned to you', notification_client_id = $client_id, notification_user_id = $ticket_assigned_to"); } // Notification for user that opened the ticket - if (intval($session_user_id) !== $ticket_created_by || $ticket_created_by !== 0) { + if ($session_user_id != $ticket_created_by && $ticket_created_by != 0) { mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Ticket', notification = '$session_name updated Ticket $ticket_prefix_escaped$ticket_number - Subject: $ticket_subject_escaped that you opened', notification_client_id = $client_id, notification_user_id = $ticket_created_by"); }