Fixed problems with export audit log to csv when no data to show
This commit is contained in:
parent
89faf1f7f5
commit
bddc05e21d
|
@ -2230,9 +2230,14 @@ function print_audit_csv ($data) {
|
|||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
|
||||
echo __('User') . ';' . __('Action') . ';' . __('Date') . ';' . __('Source ID') . ';'. __('Comments') ."\n";
|
||||
foreach ($data as $line) {
|
||||
echo io_safe_output($line['id_usuario']) . ';' . io_safe_output($line['accion']) . ';' . $line['fecha'] . ';' . $line['ip_origen'] . ';'. io_safe_output($line['descripcion']). "\n";
|
||||
if ($data){
|
||||
echo __('User') . ';' . __('Action') . ';' . __('Date') . ';' . __('Source ID') . ';'. __('Comments') ."\n";
|
||||
foreach ($data as $line) {
|
||||
echo io_safe_output($line['id_usuario']) . ';' . io_safe_output($line['accion']) . ';' . $line['fecha'] . ';' . $line['ip_origen'] . ';'. io_safe_output($line['descripcion']). "\n";
|
||||
}
|
||||
}
|
||||
else{
|
||||
echo __('No data found to export');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue