diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-12-18 12:58:23 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-12-18 12:58:23 -0800 |
commit | c80427964751cdbd7a800996d3d556699fdf0405 (patch) | |
tree | c3e696b79e520d06a72b863c1fff7cfd65506d34 | |
parent | eb55a3c9776d27eb8525c3cf1718456a19258936 (diff) |
Add the parent path to the resource
-rw-r--r-- | modules/gallery/helpers/gallery_rest.php | 2 |
1 files changed, 2 insertions, 0 deletions
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, |