Merge branch 'ent-10631-15172-problema-con-carga-de-comentarios-en-tabla-de-eventos' into 'develop'

fix comments events pandora_enterprise#10631

See merge request artica/pandorafms!5694
This commit is contained in:
Daniel Rodriguez 2023-04-18 11:01:14 +00:00
commit fb2b261698
1 changed files with 12 additions and 15 deletions

View File

@ -7057,14 +7057,13 @@ function ui_print_comments($comments)
}
}
$last_comment = [];
foreach ($comments_array as $comm) {
// Show the comments more recent first.
if (is_array($comm)) {
$order_utimestamp = array_reduce(
$comm,
$comments_array,
function ($carry, $item) {
$carry[$item['utimestamp']] = $item;
foreach ($item as $k => $v) {
$carry[$v['utimestamp']] = $v;
}
return $carry;
}
);
@ -7072,8 +7071,6 @@ function ui_print_comments($comments)
$key_max_utimestamp = max(array_keys($order_utimestamp));
$last_comment = $order_utimestamp[$key_max_utimestamp];
}
}
if (empty($last_comment) === true) {
return '';