diff options
Diffstat (limited to 'modules-available/locations/inc')
-rw-r--r-- | modules-available/locations/inc/location.inc.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules-available/locations/inc/location.inc.php b/modules-available/locations/inc/location.inc.php index 8db0c5f3..bd4be245 100644 --- a/modules-available/locations/inc/location.inc.php +++ b/modules-available/locations/inc/location.inc.php @@ -87,11 +87,13 @@ class Location } $output = array(); foreach ($tree as $node) { + $cc = empty($node['children']) ? array() : array_map(function ($item) { return (int)$item['locationid']; }, $node['children']); $output[(int)$node['locationid']] = array( 'locationid' => (int)$node['locationid'], 'parentlocationid' => (int)$node['parentlocationid'], 'parents' => $parents, - 'children' => empty($node['children']) ? array() : array_map(function ($item) { return (int)$item['locationid']; }, $node['children']), + 'children' => $cc, + 'directchildren' => $cc, 'locationname' => $node['locationname'], 'depth' => $depth, 'isleaf' => true, |