summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/items.php
diff options
context:
space:
mode:
authormamouneyya <mamoun.diraneyya@gmail.com>2010-09-07 08:41:25 +0300
committermamouneyya <mamoun.diraneyya@gmail.com>2010-09-07 08:41:25 +0300
commitba950bec0c84a1467aa2545ca815d5af7b0b002b (patch)
tree307cdacf0ece60ae9b2db94ad43fcf00d769dcfc /modules/gallery/controllers/items.php
parent9572c664d2bfff0877d4f2062eb0ef6665a109cf (diff)
parent7c80bc0c3db1ca20ce424a36a05f1337de9e1e31 (diff)
Merge remote branch 'gallery3/master'
Diffstat (limited to 'modules/gallery/controllers/items.php')
-rw-r--r--modules/gallery/controllers/items.php9
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)));
+ }
}