Merge branch 'ent-6966-No-se-ve-fecha-validacion' into 'develop'

Fixed issue with date

Closes pandora_enterprise#6966

See merge request artica/pandorafms!3818
This commit is contained in:
Daniel Rodriguez 2021-03-09 16:37:34 +00:00
commit 4996be48dc
2 changed files with 16 additions and 10 deletions

View File

@ -4839,19 +4839,22 @@ function events_page_general($event)
$data[0] = __('Acknowledged by');
if ($event['estado'] == 1) {
$user_ack = db_get_value(
'fullname',
'tusuario',
'id_user',
$event['id_usuario']
);
if (empty($event['id_usuario']) === true) {
$user_ack = __('Autovalidated');
} else {
$user_ack = db_get_value(
'fullname',
'tusuario',
'id_user',
$event['id_usuario']
);
if (empty($user_ack) === true) {
$user_ack = $event['id_usuario'];
if (empty($user_ack) === true) {
$user_ack = $event['id_usuario'];
}
}
$date_ack = io_safe_output($event['ack_utimestamp']);
$data[1] = $user_ack.' ('.$date_ack.')';
$data[1] = $user_ack.' ( '.date($config['date_format'], $event['ack_utimestamp_raw']).' ) ';
} else {
$data[1] = '<i>'.__('N/A').'</i>';
}

View File

@ -374,6 +374,9 @@ if (is_ajax()) {
}
$tmp->agent_name = io_safe_output($tmp->agent_name);
$tmp->ack_utimestamp_raw = strtotime($tmp->ack_utimestamp);
$tmp->ack_utimestamp = ui_print_timestamp(
$tmp->ack_utimestamp,
true