From e60edcdeba577e8cdbdbbc700cb3dfe9d0dd9443 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 17 Dec 2010 17:30:00 -0800 Subject: Include the root in the tree output. --- modules/gallery/helpers/tree_rest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/gallery/helpers/tree_rest.php') 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), -- cgit v1.2.3