Refix the thumbnail url problem with Storage so that it throws an error when no filename is passed.

This commit is contained in:
Colin Kuskie 2010-02-16 16:06:59 -08:00
parent 498b961ed7
commit 5854e95130

View file

@ -1246,13 +1246,13 @@ The file to retrieve the thumbnail for.
sub getThumbnailUrl {
my $self = shift;
my $filename = shift;
if (! $self->isImage($filename)) {
return '';
}
if (! defined $filename) {
$self->session->errorHandler->error("Can't find a thumbnail url without a filename.");
return '';
}
if (! $self->isImage($filename)) {
return '';
}
my $thumbname = 'thumb-' . $filename;
if (! -e $self->getPath($thumbname)) {
$self->session->errorHandler->error("Can't find a thumbnail for a file named '$filename' that is not in my storage location.");