From 08815cc2c2ddca5816b8266ac124d99411b7f1d5 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 7 Sep 2022 13:49:05 +0200 Subject: [PATCH] #9261 Fixed 24X7 item --- pandora_console/include/functions_agents.php | 2 +- pandora_console/include/functions_reporting_html.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index ac608e6acf..178088195c 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -789,7 +789,7 @@ function agents_get_agents_selected($group) ); $all = array_reduce( - $all, + (empty($all) === true) ? [] : $all, function ($carry, $item) { $carry[$item['id_agente']] = $item['alias']; return $carry; diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 69d85d448d..029b0d70b6 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -1756,7 +1756,8 @@ function reporting_html_modules_inventory($table, $item, $pdf=0) } else if ($data_field_key === 'group_id') { $column_value = groups_get_name($data_field_value[0]); } else if ($data_field_key === 'sec_group_id') { - $sec_groups_names = array_map(function ($group_id) { + $sec_groups_names = array_map( + function ($group_id) { return groups_get_name($group_id); }, $data_field_value @@ -4224,7 +4225,7 @@ function reporting_html_availability($table, $item, $pdf=0) } else { $table_row[] = $row['agent']; $item_name = $row['availability_item']; - if ((bool) $row['compare'] === true) { + if ((bool) $row['compare'] === false) { $item_name .= ' ('.__('24 x 7').')'; }