mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
When Dismiss all notifications are clicked only dismiss the notificaitons of the logged in user only
This commit is contained in:
@@ -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'] = "<strong>$num_notifications</strong> Notifications Dismissed";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user