summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/tree_rest.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-12-17 17:30:00 -0800
committerBharat Mediratta <bharat@menalto.com>2010-12-17 17:30:00 -0800
commite60edcdeba577e8cdbdbbc700cb3dfe9d0dd9443 (patch)
tree904f31c797d91b5ae0c08d41cedb6d06ed47f264 /modules/gallery/helpers/tree_rest.php
parentb6c202d572a2abd5fdd0205bc4d0127d3291ec24 (diff)
Include the root in the tree output.
Diffstat (limited to 'modules/gallery/helpers/tree_rest.php')
-rw-r--r--modules/gallery/helpers/tree_rest.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gallery/helpers/tree_rest.php b/modules/gallery/helpers/tree_rest.php
index 616bebe3..21928cbe 100644
--- a/modules/gallery/helpers/tree_rest.php
+++ b/modules/gallery/helpers/tree_rest.php
@@ -59,7 +59,8 @@ class tree_rest_Core {
$query_params[] = "fields={$p->fields}";
}
- $entity = array();
+ $entity = array(array("url" => rest::url("item", $item),
+ "entity" => $item->as_restful_array($fields)));
$members = array();
foreach ($item->viewable()->descendants(null, null, $where) as $child) {
$entity[] = array("url" => rest::url("item", $child),