Merge branch 'ent-12363-agent-module-view-las-columnas-se-muestran-mal-al-exportar-a-csv' into 'develop'
Fix csv agent-module pandora_enterprise#12363 See merge request artica/pandorafms!6623
This commit is contained in:
commit
57124c4f26
|
@ -106,7 +106,25 @@ if ($get_agents_module_csv === '1') {
|
|||
|
||||
foreach ($results as $result) {
|
||||
foreach ($result as $key => $value) {
|
||||
$out_csv .= io_safe_output($value).$divider;
|
||||
if (preg_match('/Linux/i', $_SERVER['HTTP_USER_AGENT'])) {
|
||||
$value = preg_replace(
|
||||
'/\s+/',
|
||||
' ',
|
||||
io_safe_output($value)
|
||||
);
|
||||
} else {
|
||||
$value = mb_convert_encoding(
|
||||
preg_replace(
|
||||
'/\s+/',
|
||||
'',
|
||||
io_safe_output($value)
|
||||
),
|
||||
'UTF-16LE',
|
||||
'UTF-8'
|
||||
);
|
||||
}
|
||||
|
||||
$out_csv .= $value.$divider;
|
||||
}
|
||||
|
||||
$out_csv .= "\n";
|
||||
|
|
|
@ -4735,7 +4735,7 @@ function export_agents_module_csv($filters)
|
|||
$query_filter .= ' AND tam.nombre IN '.$module_filter.' ';
|
||||
} else {
|
||||
$module_filter = '('.implode(', ', $filter).')';
|
||||
$query_filter .= ' AND tam.id_tipo_modulo IN '.$module_filter.' ';
|
||||
$query_filter .= ' AND tam.id_agente_modulo IN '.$module_filter.' ';
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue