Merge branch 'ent-4239-entities-en-exportacion-de-informes-nodo-meta' into 'develop'

remove entities from reports

See merge request artica/pandorafms!3079
This commit is contained in:
Alejandro Fraguas 2020-02-26 17:19:01 +01:00
commit 5340f37723
3 changed files with 8 additions and 18 deletions

View File

@ -3081,8 +3081,6 @@ function array2XML($data, $root=null, $xml=null)
$node = $xml->addChild($key); $node = $xml->addChild($key);
array2XML($value, $root, $node); array2XML($value, $root, $node);
} else { } else {
$value = htmlentities($value);
if (!is_numeric($value) && !is_bool($value)) { if (!is_numeric($value) && !is_bool($value)) {
if (!empty($value)) { if (!empty($value)) {
$xml->addChild($key, $value); $xml->addChild($key, $value);

View File

@ -2298,7 +2298,7 @@ function reporting_agent_module($report, $content)
$content['name'] = __('Agent/Modules'); $content['name'] = __('Agent/Modules');
} }
$return['title'] = $content['name']; $return['title'] = io_safe_output($content['name']);
$return['landscape'] = $content['landscape']; $return['landscape'] = $content['landscape'];
$return['pagebreak'] = $content['pagebreak']; $return['pagebreak'] = $content['pagebreak'];
$group_name = groups_get_name($content['id_group'], true); $group_name = groups_get_name($content['id_group'], true);
@ -2314,7 +2314,7 @@ function reporting_agent_module($report, $content)
} }
$return['subtitle'] = $group_name.' - '.$module_group_name; $return['subtitle'] = $group_name.' - '.$module_group_name;
$return['description'] = $content['description']; $return['description'] = io_safe_output($content['description']);
$return['date'] = reporting_get_date_text($report, $content); $return['date'] = reporting_get_date_text($report, $content);
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : ''; $return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
@ -2871,11 +2871,11 @@ function reporting_group_report($report, $content)
} }
$return['server_name'] = $server[0]; $return['server_name'] = $server[0];
$return['title'] = $content['name']; $return['title'] = io_safe_output($content['name']);
$return['landscape'] = $content['landscape']; $return['landscape'] = $content['landscape'];
$return['pagebreak'] = $content['pagebreak']; $return['pagebreak'] = $content['pagebreak'];
$return['subtitle'] = groups_get_name($content['id_group'], true); $return['subtitle'] = groups_get_name($content['id_group'], true);
$return['description'] = $content['description']; $return['description'] = io_safe_output($content['description']);
$return['date'] = reporting_get_date_text($report, $content); $return['date'] = reporting_get_date_text($report, $content);
$return['data'] = []; $return['data'] = [];
@ -2975,7 +2975,7 @@ function reporting_event_report_agent(
} }
$return['label'] = $label; $return['label'] = $label;
$return['title'] = $content['name']; $return['title'] = io_safe_output($content['name']);
$return['landscape'] = $content['landscape']; $return['landscape'] = $content['landscape'];
$return['pagebreak'] = $content['pagebreak']; $return['pagebreak'] = $content['pagebreak'];
$return['subtitle'] = io_safe_output($agent_alias); $return['subtitle'] = io_safe_output($agent_alias);
@ -7358,7 +7358,7 @@ function reporting_general($report, $content)
continue; continue;
} }
$mod_name = modules_get_agentmodule_name($row['id_agent_module']); $mod_name = io_safe_output(modules_get_agentmodule_name($row['id_agent_module']));
$ag_name = modules_get_agentmodule_agent_alias($row['id_agent_module']); $ag_name = modules_get_agentmodule_agent_alias($row['id_agent_module']);
$name_agent = modules_get_agentmodule_agent_name($row['id_agent_module']); $name_agent = modules_get_agentmodule_agent_name($row['id_agent_module']);
$type_mod = modules_get_last_value($row['id_agent_module']); $type_mod = modules_get_last_value($row['id_agent_module']);
@ -7872,14 +7872,14 @@ function reporting_simple_graph(
); );
} }
$return['title'] = $content['name']; $return['title'] = io_safe_output($content['name']);
$return['landscape'] = $content['landscape']; $return['landscape'] = $content['landscape'];
$return['pagebreak'] = $content['pagebreak']; $return['pagebreak'] = $content['pagebreak'];
$return['subtitle'] = $agent_alias.' - '.$module_name; $return['subtitle'] = $agent_alias.' - '.$module_name;
$return['agent_name_db'] = agents_get_name($id_agent); $return['agent_name_db'] = agents_get_name($id_agent);
$return['agent_name'] = $agent_alias; $return['agent_name'] = $agent_alias;
$return['module_name'] = $module_name; $return['module_name'] = $module_name;
$return['description'] = $content['description']; $return['description'] = io_safe_output($content['description']);
$return['date'] = reporting_get_date_text( $return['date'] = reporting_get_date_text(
$report, $report,
$content $content

View File

@ -31,14 +31,6 @@ function reporting_xml_get_report($report, $filename, $return=false)
unset($report['private']); unset($report['private']);
unset($report['custom_logo']); unset($report['custom_logo']);
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// change agent name.
if (count($report['contents']) > 0) {
for ($i = 0; $i < count($report['contents']); $i++) {
$aux = explode('-', $report['contents'][$i]['subtitle']);
$report['contents'][$i]['subtitle'] = db_get_value('alias', 'tagente', 'nombre', $report['contents'][$i]['agent_name']).' -'.$aux[1];
}
}
// Remove entities. // Remove entities.
$report = io_safe_output($report); $report = io_safe_output($report);