#11051 Fix checkbox

This commit is contained in:
miguel angel rasteu 2023-08-21 10:59:29 +02:00
parent ebd98b479d
commit 4191a7037f

View File

@ -1019,7 +1019,7 @@ function notifications_print_user_switch($source, $user, $label)
function notification_filter() function notification_filter()
{ {
$types_list[] = 'All'; $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) { if ($notification_types !== false) {
foreach ($notification_types as $notification_type) { foreach ($notification_types as $notification_type) {
$type = explode('.', $notification_type['subtype'])[1]; $type = explode('.', $notification_type['subtype'])[1];
@ -1027,6 +1027,7 @@ function notification_filter()
} }
} }
$types_list = array_unique($types_list);
$notification_filter = "<ul id='menu-filter_notification'>"; $notification_filter = "<ul id='menu-filter_notification'>";
$notification_filter .= "<li> $notification_filter .= "<li>
@ -1058,6 +1059,10 @@ function notification_filter()
$type_name = 'ALLOW OVERRIDE'; $type_name = 'ALLOW OVERRIDE';
break; break;
case '':
$type_name = 'DISCOVERY TASK';
break;
default: default:
$type_name = $type; $type_name = $type;
break; break;