[dw-free] error message in editicons when you try to upload from URL, but weren't able to fetch the
[commit: http://hg.dwscoalition.org/dw-free/rev/56b48ba3a2dd]
http://bugs.dwscoalition.org/show_bug.cgi?id=2558
Check for presence of uploaded image.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2558
Check for presence of uploaded image.
Patch by
Files modified:
- htdocs/editicons.bml
--------------------------------------------------------------------------------
diff -r 82440e66996f -r 56b48ba3a2dd htdocs/editicons.bml
--- a/htdocs/editicons.bml Sun Apr 25 22:33:26 2010 -0700
+++ b/htdocs/editicons.bml Sun Apr 25 23:09:08 2010 -0700
@@ -853,8 +853,8 @@ sub parse_post_uploads
my $res = $ua->get($POST{$userpic_key});
$current_upload{image} = \$res->content if $res && $res->is_success;
$current_upload{error} = $ML{'.error.urlerror'} unless $current_upload{image};
- #Below, $current_upload{image} needs to be dereferenced because it contains a hash value.
- $current_upload{error} = $ML{'.error.urlfiletoolarge'} if length( ${ $current_upload{image} } ) > $MAX_UPLOAD;
+ # Below, $current_upload{image} needs to be dereferenced because it contains a hash value.
+ $current_upload{error} = $ML{'.error.urlfiletoolarge'} if $current_upload{image} && length( ${ $current_upload{image} } ) > $MAX_UPLOAD;
}
push @uploads, \%current_upload;
}
--------------------------------------------------------------------------------
