mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Set consecutive keys for dashboard items array. Fix JS error when printing imported dashboard
This commit is contained in:
parent
57b50e4c85
commit
9733ac8717
@ -1229,7 +1229,7 @@ class Manager implements PublicLogin
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (empty($cells) === false) {
|
if (empty($cells) === false) {
|
||||||
$result = array_reduce(
|
$result = array_values(array_reduce(
|
||||||
$cells,
|
$cells,
|
||||||
function ($carry, $item) {
|
function ($carry, $item) {
|
||||||
$carry[$item['order']]['id'] = $item['id'];
|
$carry[$item['order']]['id'] = $item['id'];
|
||||||
@ -1239,7 +1239,7 @@ class Manager implements PublicLogin
|
|||||||
return $carry;
|
return $carry;
|
||||||
},
|
},
|
||||||
[]
|
[]
|
||||||
);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode($result);
|
echo json_encode($result);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user