From a08431e436c11ce2f61161248fc736685937353b Mon Sep 17 00:00:00 2001 From: JT Smith Date: Fri, 7 Mar 2003 01:12:19 +0000 Subject: [PATCH] return the image icon when image magick is not available. --- lib/WebGUI/Attachment.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Attachment.pm b/lib/WebGUI/Attachment.pm index f5fb4b801..2624b20fa 100644 --- a/lib/WebGUI/Attachment.pm +++ b/lib/WebGUI/Attachment.pm @@ -345,7 +345,7 @@ sub getSize { =head2 getThumbnail ( ) -Returns a full URL to the thumbnail for this attachment. Thumbnails are only created for jpg, gif, png, tif, and bmp with Image::Magick installed so getThumbnail only returns a thumbnail if the file is one of those types and Image::Magick is installed. +Returns a full URL to the thumbnail for this attachment. Thumbnails are only created for jpg, gif, png, tif, and bmp with Image::Magick installed so getThumbnail only returns a thumbnail if the file is one of those types and Image::Magick is installed. Otherwise, it returns the full URL to the file icon for this attachment (identical to getIcon). =cut @@ -355,7 +355,7 @@ sub getThumbnail { } elsif ($hasImageMagick && isIn($_[0]->getType, qw(tif tiff bmp))) { return $_[0]->{_node}->getURL.'/thumb-'.$_[0]->getFilename.'.png'; } else { - return ""; + return $_[0]->getIcon; } }