diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-06-15 20:25:35 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-06-15 20:25:35 -0700 |
commit | e3535349abb6e955a75d97f57971f4ea4913da6f (patch) | |
tree | fc0705d92d6be88e61a17832676eab17126fb080 /modules/gallery/models | |
parent | 57b53e6193cc6baf12bf58d8e528518a93bff03c (diff) |
Revert "Add a "convert_ids" parameter to Item_Model::as_restful_array(), which"
This reverts commit 98fce83de5f772482382bfabdbcd94c25ecdbb1a.
Conflicts:
modules/gallery/tests/Item_Model_Test.php
Diffstat (limited to 'modules/gallery/models')
-rw-r--r-- | modules/gallery/models/item.php | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 009457c1..e42430bf 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -924,21 +924,17 @@ class Item_Model extends ORM_MPTT { /** * Same as ORM::as_array() but convert id fields into their RESTful form. */ - public function as_restful_array($convert_ids=true) { + public function as_restful_array() { // Convert item ids to rest URLs for consistency $data = $this->as_array(); - - if ($convert_ids) { - if ($tmp = $this->parent()) { - $data["parent"] = rest::url("item", $tmp); - } - unset($data["parent_id"]); - - if ($tmp = $this->album_cover()) { - $data["album_cover"] = rest::url("item", $tmp); - } - unset($data["album_cover_item_id"]); + if ($tmp = $this->parent()) { + $data["parent"] = rest::url("item", $tmp); + } + unset($data["parent_id"]); + if ($tmp = $this->album_cover()) { + $data["album_cover"] = rest::url("item", $tmp); } + unset($data["album_cover_item_id"]); if (access::can("view_full", $this) && $this->is_photo()) { $data["file_url"] = $this->file_url(true); |