summaryrefslogtreecommitdiffstats
path: root/modules-available/locations
diff options
context:
space:
mode:
authorSimon Rettberg2019-07-23 13:57:20 +0200
committerSimon Rettberg2019-07-23 13:57:20 +0200
commit04828b94e9df8321feae0bfb99daa468c0d3d383 (patch)
treee3b00490dc14a0f5d6ffda5bab1ce7c82bafee52 /modules-available/locations
parentslx-fixes.js: Make .cachedScript more compatible to .getScript (diff)
downloadslx-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')
-rw-r--r--modules-available/locations/inc/location.inc.php4
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,