summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/items_rest.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers/items_rest.php')
-rw-r--r--modules/gallery/helpers/items_rest.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/gallery/helpers/items_rest.php b/modules/gallery/helpers/items_rest.php
index 32597a65..9cca9a54 100644
--- a/modules/gallery/helpers/items_rest.php
+++ b/modules/gallery/helpers/items_rest.php
@@ -21,14 +21,14 @@ class items_rest_Core {
/**
* To retrieve a collection of items, you can specify the following query parameters to specify
* the type of the collection. If both are specified, then the url parameter is used and the
- * ancestor_for is ignored. Specifying the "type" parameter with the urls parameter, will
+ * ancestors_for is ignored. Specifying the "type" parameter with the urls parameter, will
* filter the results based on the specified type. Using the type parameter with the
- * ancestor_for parameter makes no sense and will be ignored.
+ * ancestors_for parameter makes no sense and will be ignored.
*
* urls=url1,url2,url3
* return items that match the specified urls. Typically used to return the member detail
*
- * ancestor_for=url
+ * ancestors_for=url
* return the ancestors of the specified item
*
* type=<comma separate list of photo, movie or album>
@@ -45,21 +45,21 @@ class items_rest_Core {
if (access::can("view", $item)) {
if (isset($types)) {
if (in_array($item->type, $types)) {
- $items[] = items_rest::format_restful_item($item);
+ $items[] = items_rest::_format_restful_item($item);
}
} else {
- $items[] = items_rest::format_restful_item($item);
+ $items[] = items_rest::_format_restful_item($item);
}
}
}
- } else if (isset($request->params->ancestor_for)) {
- $item = rest::resolve($request->params->ancestor_for);
+ } else if (isset($request->params->ancestors_for)) {
+ $item = rest::resolve($request->params->ancestors_for);
if (!access::can("view", $item)) {
throw new Kohana_404_Exception();
}
- $items[] = items_rest::format_restful_item($item);
+ $items[] = items_rest::_format_restful_item($item);
while (($item = $item->parent()) != null) {
- array_unshift($items, items_rest::format_restful_item($item));
+ array_unshift($items, items_rest::_format_restful_item($item));
};
}
@@ -74,7 +74,7 @@ class items_rest_Core {
return $item;
}
- private static function format_restful_item($item) {
+ private static function _format_restful_item($item) {
$item_rest = array("url" => rest::url("item", $item),
"entity" => $item->as_restful_array(),
"relationships" => rest::relationships("item", $item));