Commit 5fd2b62a authored by Albert Ting's avatar Albert Ting Committed by Frédéric Buclin

Bug 1196517: Properly set the disposition for non-viewable attachments

r=LpSolit a=sgreen
parent 19d20ef6
......@@ -346,7 +346,8 @@ sub view {
local $Encode::Encoding{'MIME-Q'}->{'bpl'} = 10000;
$filename = encode('MIME-Q', $filename);
my $disposition = Bugzilla->params->{'allow_attachment_display'} ? 'inline' : 'attachment';
my $disposition = (Bugzilla->params->{'allow_attachment_display'}
&& $attachment->is_viewable) ? 'inline' : 'attachment';
# Don't send a charset header with attachments--they might not be UTF-8.
# However, we do allow people to explicitly specify a charset if they
......
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