diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-09-17 20:23:05 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-09-17 20:23:05 +0000 |
| commit | 7a5de04e51daa102840a02af6b9ce8138d08c4bb (patch) | |
| tree | a3f8bcb9ac961523b4835b8865c152c8835f25e7 /modules/gallery/controllers/items.php | |
| parent | f96a75f2b13a0bd7a37b320aa5655f67868ca80d (diff) | |
| parent | 3e1743b21fd35b9d6d540e827292f1f4f006b531 (diff) | |
Pulled latest source from upstream.
Diffstat (limited to 'modules/gallery/controllers/items.php')
| -rw-r--r-- | modules/gallery/controllers/items.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gallery/controllers/items.php b/modules/gallery/controllers/items.php index f205bf86..39b0f638 100644 --- a/modules/gallery/controllers/items.php +++ b/modules/gallery/controllers/items.php @@ -31,4 +31,13 @@ class Items_Controller extends Controller { access::required("view", $item); url::redirect($item->abs_url()); } + + // Return the width/height dimensinons for the given item + public function dimensions($id) { + $item = ORM::factory("item", $id); + access::required("view", $item); + json::reply(array("thumb" => array((int)$item->thumb_width, (int)$item->thumb_height), + "resize" => array((int)$item->resize_width, (int)$item->resize_height), + "full" => array((int)$item->width, (int)$item->height))); + } } |
