Modified the divider in print_audit_csv function

This commit is contained in:
Jose Gonzalez 2019-07-25 15:35:57 +02:00
parent 8279fff11b
commit 5cdfb871a1
1 changed files with 4 additions and 2 deletions

View File

@ -2852,6 +2852,8 @@ function print_audit_csv($data)
global $config;
global $graphic_type;
$divider = $config['csv_divider'];
if (!$data) {
echo __('No data found to export');
return 0;
@ -2869,9 +2871,9 @@ function print_audit_csv($data)
// BOM
print pack('C*', 0xEF, 0xBB, 0xBF);
echo __('User').';'.__('Action').';'.__('Date').';'.__('Source IP').';'.__('Comments')."\n";
echo __('User').$divider.__('Action').$divider.__('Date').$divider.__('Source IP').$divider.__('Comments')."\n";
foreach ($data as $line) {
echo io_safe_output($line['id_usuario']).';'.io_safe_output($line['accion']).';'.date($config['date_format'], $line['utimestamp']).';'.$line['ip_origen'].';'.io_safe_output($line['descripcion'])."\n";
echo io_safe_output($line['id_usuario']).$divider.io_safe_output($line['accion']).$divider.date($config['date_format'], $line['utimestamp']).$divider.$line['ip_origen'].$divider.io_safe_output($line['descripcion'])."\n";
}
exit;