summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
*/