summaryrefslogtreecommitdiff
path: root/modules/gallery/models
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/models')
-rw-r--r--modules/gallery/models/item.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index dfcbdd70..f59caa65 100644
--- a/modules/gallery/models/item.php
+++ b/modules/gallery/models/item.php
@@ -923,12 +923,15 @@ class Item_Model extends ORM_MPTT {
/**
* Same as ORM::as_array() but convert id fields into their RESTful form.
+ * Convert any item ids into REST urls
+ *
+ * @param bool preserve_ids true if we should preserve ids
*/
- public function as_restful_array($convert_ids=true) {
+ public function as_restful_array($preserve_ids) {
// Convert item ids to rest URLs for consistency
$data = $this->as_array();
- if ($convert_ids) {
+ if (!$preserve_ids) {
if ($tmp = $this->parent()) {
$data["parent"] = rest::url("item", $tmp);
}