From c80427964751cdbd7a800996d3d556699fdf0405 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 18 Dec 2009 12:58:23 -0800 Subject: Add the parent path to the resource --- modules/gallery/helpers/gallery_rest.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/gallery_rest.php b/modules/gallery/helpers/gallery_rest.php index 6fad2fc2..30a37ad1 100644 --- a/modules/gallery/helpers/gallery_rest.php +++ b/modules/gallery/helpers/gallery_rest.php @@ -32,9 +32,11 @@ class gallery_rest_Core { return rest::not_found("Resource: {$request->path} missing."); } + $parent = $item->parent(); $response_data = array("type" => $item->type, "name" => $item->name, "path" => $item->relative_url(), + "parent_path" => empty($parent) ? null : $parent->relative_url(), "title" => $item->title, "thumb_url" => $item->thumb_url(true), "thumb_size" => array("height" => $item->thumb_height, -- cgit v1.2.3