summaryrefslogtreecommitdiff
path: root/modules/gallery/models
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-02-27 14:03:01 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-02-27 14:03:01 +0000
commita58aa6e97b0e44adf7a878db6e276b081e202192 (patch)
treececc68b1222cb283a021478b822952c468d64393 /modules/gallery/models
parent10e36fcf1b5acf07c5cc128105af03fb09aac89e (diff)
parentd9707ae749df2770370dc4eeeeaddda28f092d4d (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/models')
-rw-r--r--modules/gallery/models/item.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index dbd56fa2..d747b84d 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_full", $this) && $this->is_photo()) {
+ $data["file_url"] = $this->file_url(true);
+ }
+
+ if (($tmp = $this->resize_url(true)) && $this->is_photo()) {
+ $data["resize_url"] = $tmp;
+ }
+ $data["thumb_url"] = $this->thumb_url(true);
+
// 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;