Commit 613d9ce7 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 582529: Ambiguous error message "You did not specify a file to attach" when…

Bug 582529: Ambiguous error message "You did not specify a file to attach" when deleting an existing attachment filename a=LpSolit
parent e4f8a784
......@@ -565,7 +565,14 @@ sub _check_filename {
my ($invocant, $filename) = @_;
$filename = clean_text($filename);
$filename || ThrowUserError('file_not_specified');
if (!$filename) {
if (ref $invocant) {
ThrowUserError('filename_not_specified');
}
else {
ThrowUserError('file_not_specified');
}
}
# Remove path info (if any) from the file name. The browser should do this
# for us, but some are buggy. This may not work on Mac file names and could
......
......@@ -604,6 +604,10 @@
[% title = "No File Specified" %]
You did not specify a file to attach.
[% ELSIF error == "filename_not_specified" %]
[% title = "No Filename Specified" %]
You must specify a filename for this attachment.
[% ELSIF error == "file_too_large" %]
[% title = "File Too Large" %]
[%# Convert maxlocalattachment from Mb to Kb %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment