From 8860176b3963cf33f762f65f9cec545d51faf155 Mon Sep 17 00:00:00 2001 From: Roy Johnson Date: Wed, 8 Nov 2006 16:14:38 +0000 Subject: [PATCH] Added a few comments so mere mortals like me will understand what this does in 30 years --- lib/WebGUI/Form/Image.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/WebGUI/Form/Image.pm b/lib/WebGUI/Form/Image.pm index e2db93fc9..0e814f142 100644 --- a/lib/WebGUI/Form/Image.pm +++ b/lib/WebGUI/Form/Image.pm @@ -148,17 +148,16 @@ sub getValueFromPost { my $storage = WebGUI::Storage::Image->get($self->session, $id); if (defined $storage) { my @files = @{$storage->getFiles}; - my @images = grep{$storage->isImage($_)} @files; + my @images = grep{$storage->isImage($_)} @files; # Put all filenames that isImage returns true for into @images if ($self->get('forceImageOnly')) { - $storage->deleteFile($_) for grep{!isIn($_, @images)} @files; + $storage->deleteFile($_) for grep{!isIn($_, @images)} @files; # Search @files for filenames that are not in @images and delete them @files = @images; } return undef unless @files; - $storage->generateThumbnail($_) for @images; + $storage->generateThumbnail($_) for @images; # Make a thumbnail for each filename in @images } } - return $id; }