diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index eb215340c3..9a5f8bae7c 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -151,11 +151,13 @@ function reporting_make_reporting_data( $contents = $report['contents']; } else { $report = io_safe_output(db_get_row('treport', 'id_report', $id_report)); - $contents = db_get_all_rows_field_filter( - 'treport_content', - 'id_report', - $id_report, - db_escape_key_identifier('order') + $contents = io_safe_output( + db_get_all_rows_field_filter( + 'treport_content', + 'id_report', + $id_report, + db_escape_key_identifier('order') + ) ); } @@ -326,26 +328,32 @@ function reporting_make_reporting_data( break; case 'general': - $report['contents'][] = reporting_general( - $report, - $content + $report['contents'][] = io_safe_output( + reporting_general( + $report, + $content + ) ); break; case 'availability': - $report['contents'][] = reporting_availability( - $report, - $content, - $date, - $time + $report['contents'][] = io_safe_output( + reporting_availability( + $report, + $content, + $date, + $time + ) ); break; case 'availability_graph': - $report['contents'][] = reporting_availability_graph( - $report, - $content, - $pdf + $report['contents'][] = io_safe_output( + reporting_availability_graph( + $report, + $content, + $pdf + ) ); break; @@ -475,9 +483,11 @@ function reporting_make_reporting_data( break; case 'agent_configuration': - $report['contents'][] = reporting_agent_configuration( - $report, - $content + $report['contents'][] = io_safe_output( + reporting_agent_configuration( + $report, + $content + ) ); break; @@ -673,12 +683,14 @@ function reporting_make_reporting_data( case 'agent_detailed_event': case 'event_report_agent': - $report_control = reporting_event_report_agent( - $report, - $content, - $type, - $force_width_chart, - $force_height_chart + $report_control = io_safe_output( + reporting_event_report_agent( + $report, + $content, + $type, + $force_width_chart, + $force_height_chart + ) ); if ($report_control['total_events'] == 0 && $content['hide_no_data'] == 1) { continue; @@ -2176,7 +2188,7 @@ function reporting_agent_module($report, $content) foreach ($agents as $agent) { $row = []; $row['agent_status'][$agent] = agents_get_status($agent); - $row['agent_name'] = agents_get_alias($agent); + $row['agent_name'] = io_safe_output(agents_get_alias($agent)); $agent_modules = agents_get_modules($agent); $row['modules'] = []; @@ -2777,7 +2789,7 @@ function reporting_event_report_agent( } $return['title'] = $content['name']; - $return['subtitle'] = agents_get_alias($content['id_agent']); + $return['subtitle'] = io_safe_output(agents_get_alias($content['id_agent'])); $return['description'] = $content['description']; $return['date'] = reporting_get_date_text($report, $content); @@ -6073,7 +6085,7 @@ function reporting_advanced_sla( // SLA. $return['SLA'] = reporting_sla_get_compliance_from_array($return); - $return['SLA_fixed'] = sla_truncate( + $return['sla_fixed'] = sla_truncate( $return['SLA'], $config['graph_precision'] ); @@ -6396,10 +6408,12 @@ function reporting_availability_graph($report, $content, $pdf=false) $edge_interval = 10; if (empty($content['subitems'])) { - $slas = db_get_all_rows_field_filter( - 'treport_content_sla_combined', - 'id_report_content', - $content['id_rc'] + $slas = io_safe_output( + db_get_all_rows_field_filter( + 'treport_content_sla_combined', + 'id_report_content', + $content['id_rc'] + ) ); } else { $slas = $content['subitems'];