diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-12-17 17:30:00 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-12-17 17:30:00 -0800 |
commit | e60edcdeba577e8cdbdbbc700cb3dfe9d0dd9443 (patch) | |
tree | 904f31c797d91b5ae0c08d41cedb6d06ed47f264 | |
parent | b6c202d572a2abd5fdd0205bc4d0127d3291ec24 (diff) |
Include the root in the tree output.
-rw-r--r-- | modules/gallery/helpers/tree_rest.php | 3 |
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), |