From a81bcf350c7938561d97e96ffc4e131e92b4cb8d Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sun, 17 Nov 2024 15:03:05 -0500 Subject: [PATCH] When Dismiss all notifications are clicked only dismiss the notificaitons of the logged in user only --- post/misc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/post/misc.php b/post/misc.php index c5f21b3c..75ca7b16 100644 --- a/post/misc.php +++ b/post/misc.php @@ -35,7 +35,7 @@ if (isset($_GET['dismiss_notification'])) { if (isset($_GET['dismiss_all_notifications'])) { - $sql = mysqli_query($mysqli,"SELECT * FROM notifications WHERE notification_dismissed_at IS NULL"); + $sql = mysqli_query($mysqli,"SELECT * FROM notifications WHERE notification_user_id = $session_user_id AND notification_dismissed_at IS NULL"); $num_notifications = mysqli_num_rows($sql); @@ -50,7 +50,7 @@ if (isset($_GET['dismiss_all_notifications'])) { // Logging logAction("Notification", "Dismiss", "$session_name dismissed $num_notifications notifications"); - $_SESSION['alert_message'] = "$num_notifications Notifications Dismissed"; + $_SESSION['alert_message'] = "$num_notifications Notifications Dismissed"; header("Location: " . $_SERVER["HTTP_REFERER"]);