From 4191a7037f93861c98d0896ac8f5fa6ea2e53dbe Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Mon, 21 Aug 2023 10:59:29 +0200 Subject: [PATCH] #11051 Fix checkbox --- pandora_console/include/functions_notifications.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_notifications.php b/pandora_console/include/functions_notifications.php index b75e427129..c04d6ebfb4 100644 --- a/pandora_console/include/functions_notifications.php +++ b/pandora_console/include/functions_notifications.php @@ -1019,7 +1019,7 @@ function notifications_print_user_switch($source, $user, $label) function notification_filter() { $types_list[] = 'All'; - $notification_types = db_get_all_rows_sql('SELECT DISTINCT subtype FROM tmensajes'); + $notification_types = db_get_all_rows_sql('SELECT DISTINCT tm.subtype FROM tmensajes as tm INNER JOIN tnotification_user as tnu ON tm.id_mensaje = tnu.id_mensaje WHERE tnu.utimestamp_read IS NULL'); if ($notification_types !== false) { foreach ($notification_types as $notification_type) { $type = explode('.', $notification_type['subtype'])[1]; @@ -1027,6 +1027,7 @@ function notification_filter() } } + $types_list = array_unique($types_list); $notification_filter = "