diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2b4603c29f..3f07a9211a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,7 @@ +2009-03-05 Sancho Lerena + + * include/functions_reporting.php: Fixed notice. + 2009-03-05 Evi Vanoost * include/auth/ldap.php: Fixed a small issue to check on a variable diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index c584d3dec5..c67c7ac7ae 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -709,13 +709,15 @@ function get_agents_detailed_event_reporting ($id_agents, $period = 0, $date = 0 $table->head[4] = __('Timestamp'); $events = array (); + if ($events) foreach ($id_agents as $id_agent) { $event = get_agent_events ($id_agent, (int) $period, (int) $date); if (!empty ($event)) { array_push ($events, $event); } } - + + if ($events) foreach ($events as $event) { $data = array (); $data[0] = $event['evento']; @@ -725,8 +727,9 @@ function get_agents_detailed_event_reporting ($id_agents, $period = 0, $date = 0 $data[4] = $event['time2']; array_push ($table->data, $data); } - - return print_table ($table, $return); + + if ($events) + return print_table ($table, $return); } ?>