From 10c06989493bdded5f15880baadbc93c5d8ee296 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 19 Feb 2010 11:48:54 -0800 Subject: Correct the view_fillsize permission to view_full. In addition, change the name of the field containing the url to the fullsize image to file_url instead of fullzie_url --- modules/gallery/models/item.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/gallery/models') diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index a64bcb49..d80e2bc4 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -930,11 +930,11 @@ 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(true); + if (access::can("view_full", $this) && $this->is_photo()) { + $data["file_url"] = $this->abs_url(true); } - if ($tmp = $this->resize_url(true) && $this->is_photo()) { + if ($tmp = $this->resize_url(true) && $this->is_photo()) { $data["resize_url"] = $tmp; } $data["thumb_url"] = $this->thumb_url(true); -- cgit v1.2.3 From 5fbc472300ce6b19a2694a5f91b1fe0b2cc470f3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 19 Feb 2010 11:54:03 -0800 Subject: Fix the resize_url and file_url in as_restful_array() --- modules/gallery/models/item.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gallery/models') diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index d80e2bc4..d747b84d 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -931,10 +931,10 @@ 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->abs_url(true); + $data["file_url"] = $this->file_url(true); } - if ($tmp = $this->resize_url(true) && $this->is_photo()) { + if (($tmp = $this->resize_url(true)) && $this->is_photo()) { $data["resize_url"] = $tmp; } $data["thumb_url"] = $this->thumb_url(true); -- cgit v1.2.3