Commit 96b6cc3c authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 584110: Don't name attachment files "attachment.txt" by default, because this confuses IE

a=LpSolit
parent 5ba1d524
......@@ -481,7 +481,7 @@ sub insert {
creation_ts => $timestamp,
data => scalar $cgi->param('attach_text') || $cgi->upload('data'),
description => scalar $cgi->param('description'),
filename => $cgi->param('attach_text') ? 'attachment.txt' : scalar $cgi->upload('data'),
filename => $cgi->param('attach_text') ? "file_$bugid.txt" : scalar $cgi->upload('data'),
ispatch => scalar $cgi->param('ispatch'),
isprivate => scalar $cgi->param('isprivate'),
mimetype => $content_type,
......
......@@ -200,7 +200,7 @@ if (defined($cgi->upload('data')) || $cgi->param('attach_text')) {
creation_ts => $timestamp,
data => scalar $cgi->param('attach_text') || $cgi->upload('data'),
description => scalar $cgi->param('description'),
filename => $cgi->param('attach_text') ? 'attachment.txt' : scalar $cgi->upload('data'),
filename => $cgi->param('attach_text') ? "file_$id.txt" : scalar $cgi->upload('data'),
ispatch => scalar $cgi->param('ispatch'),
isprivate => scalar $cgi->param('isprivate'),
mimetype => $content_type,
......
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