From 6d7f02ff31c6c929223030b051541b1bf103f3a8 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 8 Nov 2010 17:22:01 -0800 Subject: Pass file attachment thumbnails along with oEmbed data. --- classes/File.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'classes/File.php') diff --git a/classes/File.php b/classes/File.php index e3b922d13..56bc73ab2 100644 --- a/classes/File.php +++ b/classes/File.php @@ -384,4 +384,14 @@ class File extends Memcached_DataObject $enclosure = $this->getEnclosure(); return !empty($enclosure); } + + /** + * Get the attachment's thumbnail record, if any. + * + * @return File_thumbnail + */ + function getThumbnail() + { + return File_thumbnail::staticGet('file_id', $this->id); + } } -- cgit v1.2.3-54-g00ecf