diff options
author | Simon Rettberg | 2019-07-23 13:57:20 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-07-23 13:57:20 +0200 |
commit | 04828b94e9df8321feae0bfb99daa468c0d3d383 (patch) | |
tree | e3b00490dc14a0f5d6ffda5bab1ce7c82bafee52 /modules-available/locations/inc/location.inc.php | |
parent | slx-fixes.js: Make .cachedScript more compatible to .getScript (diff) | |
download | slx-admin-04828b94e9df8321feae0bfb99daa468c0d3d383.tar.gz slx-admin-04828b94e9df8321feae0bfb99daa468c0d3d383.tar.xz slx-admin-04828b94e9df8321feae0bfb99daa468c0d3d383.zip |
[roomplanner] Support creating recursive/composed rooms
Diffstat (limited to 'modules-available/locations/inc/location.inc.php')
-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, |