summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/helpers/gallery_rest.php2
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,