diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2010-09-07 18:53:25 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-09-07 18:53:25 -0700 |
| commit | 5a26dd542a3cb4974870bcfeec4864d1daa616c4 (patch) | |
| tree | dede0baa9ba893a4987bffc7ddaf925694e5ddde /modules/gallery/controllers | |
| parent | b6fa33faf789749f4de3f4eadf8832748372c980 (diff) | |
| parent | d398651c080c18e4f1bf623548091465dac1d528 (diff) | |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/controllers')
| -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))); + } } |
