summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-05-11 20:17:03 +0000
committerBharat Mediratta <bharat@menalto.com>2009-05-11 20:17:03 +0000
commit5dbe1e59d88f1fdbf301c70176b3ea3702ba0adf (patch)
treec4b809878021a25b71e497ab92eea2789dadfd2d /core
parenta70cbed1d01ddfc56038720a3e7c1d81a4b9dc14 (diff)
Add has_thumb() public API method
Diffstat (limited to 'core')
-rw-r--r--core/models/item.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/models/item.php b/core/models/item.php
index 5b9211be..3041e31e 100644
--- a/core/models/item.php
+++ b/core/models/item.php
@@ -205,6 +205,13 @@ class Item_Model extends ORM_MPTT {
}
/**
+ * Return true if there is a thumbnail for this item.
+ */
+ public function has_thumb() {
+ return $this->thumb_width && $this->thumb_height;
+ }
+
+ /**
* album: http://example.com/gallery3/var/resizes/album1/.thumb.jpg
* photo: http://example.com/gallery3/var/albums/album1/photo.thumb.jpg
*/