mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
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:
commit
fb2b261698
@ -7057,23 +7057,20 @@ function ui_print_comments($comments)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$last_comment = [];
|
$order_utimestamp = array_reduce(
|
||||||
foreach ($comments_array as $comm) {
|
$comments_array,
|
||||||
// Show the comments more recent first.
|
function ($carry, $item) {
|
||||||
if (is_array($comm)) {
|
foreach ($item as $k => $v) {
|
||||||
$order_utimestamp = array_reduce(
|
$carry[$v['utimestamp']] = $v;
|
||||||
$comm,
|
}
|
||||||
function ($carry, $item) {
|
|
||||||
$carry[$item['utimestamp']] = $item;
|
|
||||||
return $carry;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
$key_max_utimestamp = max(array_keys($order_utimestamp));
|
return $carry;
|
||||||
|
|
||||||
$last_comment = $order_utimestamp[$key_max_utimestamp];
|
|
||||||
}
|
}
|
||||||
}
|
);
|
||||||
|
|
||||||
|
$key_max_utimestamp = max(array_keys($order_utimestamp));
|
||||||
|
|
||||||
|
$last_comment = $order_utimestamp[$key_max_utimestamp];
|
||||||
|
|
||||||
if (empty($last_comment) === true) {
|
if (empty($last_comment) === true) {
|
||||||
return '';
|
return '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user