diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-02-15 06:27:17 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-02-15 06:27:17 -0800 |
commit | eb1cdd037646b3697b64753652669fa9e25a5c8e (patch) | |
tree | 2f9dd9bd70329d5997993eced0a9f94a80895b8a /modules/gallery/models | |
parent | e41a2d4e5226c45a5201df91ca6633a40b357630 (diff) | |
parent | 409121942590e12692eaf4e6e9e8b71bfe5ed60c (diff) |
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/models')
-rw-r--r-- | modules/gallery/models/item.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index dbd56fa2..283654c7 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -930,8 +930,18 @@ class Item_Model extends ORM_MPTT { } unset($data["album_cover_item_id"]); + if (access::can("view_fillsize", $this) && $this->is_photo()) { + $data["fullsize_url"] = $this->abs_url(); + } + + if ($tmp = $this->resize_url() && $this->is_photo()) { + $data["resize_url"] = $tmp; + } + $data["thumb_url"] = $this->thumb_url(); + // Elide some internal-only data that is going to cause confusion in the client. - foreach (array("relative_path_cache", "relative_url_cache", "left_ptr", "right_ptr") as $key) { + foreach (array("relative_path_cache", "relative_url_cache", "left_ptr", "right_ptr", + "thumb_dirty", "resize_dirty") as $key) { unset($data[$key]); } return $data; |