diff options
author | Nathan Kinkade <nath@nkinka.de> | 2013-06-13 21:42:10 +0000 |
---|---|---|
committer | Nathan Kinkade <nath@nkinka.de> | 2013-06-13 21:42:10 +0000 |
commit | 9ef4eff6aea4ec1135f7b12ff8f22dc296cc91ba (patch) | |
tree | fa8363f922cbc0bdde1838b744e2ed36c23c0bc9 /modules/gallery/helpers | |
parent | 9569b43035de9645e82271896e302c8d082d960a (diff) | |
parent | a3d06cc5bca05cc1b892872f494e83a24837d06f (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/data_rest.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/gallery/helpers/data_rest.php b/modules/gallery/helpers/data_rest.php index d4f456d7..a0a225f9 100644 --- a/modules/gallery/helpers/data_rest.php +++ b/modules/gallery/helpers/data_rest.php @@ -25,7 +25,6 @@ class data_rest_Core { static function get($request) { $item = rest::resolve($request->url); - access::required("view", $item); $p = $request->params; if (!isset($p->size) || !in_array($p->size, array("thumb", "resize", "full"))) { @@ -36,10 +35,16 @@ class data_rest_Core { // see if you should make the same change there as well. if ($p->size == "full") { + if ($item->is_album()) { + throw new Kohana_404_Exception(); + } + access::required("view_full", $item); $file = $item->file_path(); } else if ($p->size == "resize") { + access::required("view", $item); $file = $item->resize_path(); } else { + access::required("view", $item); $file = $item->thumb_path(); } |