mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
fix bug: label macros not being replaced in view report
This commit is contained in:
parent
51d7104de7
commit
d5362c1d5d
@ -284,6 +284,25 @@ function reporting_make_reporting_data(
|
||||
if (!metaconsole_load_external_db($connection)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$items_label['agent_description'] = agents_get_description($content['id_agent']);
|
||||
$items_label['agent_group'] = agents_get_agent_group($content['id_agent']);
|
||||
$items_label['agent_address'] = agents_get_address($content['id_agent']);
|
||||
|
||||
$modules = agents_get_modules(
|
||||
$agent_value,
|
||||
[
|
||||
'id_agente_modulo',
|
||||
'nombre',
|
||||
'descripcion',
|
||||
],
|
||||
[
|
||||
'id_agente_modulo' => $content['id_agent_module'],
|
||||
]
|
||||
);
|
||||
|
||||
$items_label['module_name'] = $modules[$content['id_agent_module']]['nombre'];
|
||||
$items_label['module_description'] = $modules[$content['id_agent_module']]['descripcion'];
|
||||
}
|
||||
|
||||
if (is_array($content['id_agent']) && count($content['id_agent']) != 1) {
|
||||
@ -294,12 +313,12 @@ function reporting_make_reporting_data(
|
||||
$content['style']['name_label'] = str_replace('_module_', count($content['id_agent_module']).__(' modules'), $content['style']['name_label']);
|
||||
}
|
||||
|
||||
$content['name'] = reporting_label_macro($items_label, $content['style']['name_label']);
|
||||
|
||||
if ($metaconsole_on) {
|
||||
// Restore db connection.
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
$content['name'] = reporting_label_macro($items_label, $content['style']['name_label']);
|
||||
}
|
||||
|
||||
switch (reporting_get_type($content)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user