Skip to content

Commit 6df53db

Browse files
author
wrongecho
committed
Bugfix: Ticket feedback notifications
1 parent 0ffb399 commit 6df53db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

portal/portal_post.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@
188188

189189
// Notify on bad feedback
190190
if ($feedback == "Bad") {
191-
mysqli_query($mysqli, "INSERT INTO notifications SET notification_type = 'Feedback', notification = '$session_contact_name rated ticket ID $ticket_id as bad', notification_client_id = $session_client_id");
191+
$ticket_details = mysqli_fetch_array(mysqli_query($mysqli, "SELECT ticket_number FROM tickets WHERE ticket_id = $ticket_id LIMIT 1"));
192+
$ticket_number = intval($ticket_details['ticket_number']);
193+
appNotify("Feedback", "$session_contact_name rated ticket $config_ticket_prefix$ticket_number as bad (ID: $ticket_id)", "ticket.php?ticket_id=$ticket_id", $session_client_id, $ticket_id);
192194
}
193195

194196
// Custom action/notif handler

0 commit comments

Comments
 (0)