diff options
author | 2010-07-18 19:17:26 +0200 | |
---|---|---|
committer | 2010-07-18 19:17:26 +0200 | |
commit | 2addcaadedfe714bd0502911cc85cdab24736465 (patch) | |
tree | 0e58e2ce48866cdf7198d7d45df1348bf1e0859a /post_bug.cgi | |
parent | Bug 579695: Make xt/search.t do substring tests using a more consistent (diff) | |
download | bugzilla-2addcaadedfe714bd0502911cc85cdab24736465.tar.gz bugzilla-2addcaadedfe714bd0502911cc85cdab24736465.tar.bz2 bugzilla-2addcaadedfe714bd0502911cc85cdab24736465.zip |
Bug 119703: Create an attachment by pasting it into a text field
r/a=mkanat
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index 956856b12..74d26af2b 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -183,7 +183,7 @@ if (defined $cgi->param('version')) { # after the bug is filed. # Add an attachment if requested. -if (defined($cgi->upload('data')) || $cgi->param('attachurl')) { +if (defined($cgi->upload('data')) || $cgi->param('attach_text')) { $cgi->param('isprivate', $cgi->param('commentprivacy')); # Must be called before create() as it may alter $cgi->param('ispatch'). @@ -198,12 +198,11 @@ if (defined($cgi->upload('data')) || $cgi->param('attachurl')) { $attachment = Bugzilla::Attachment->create( {bug => $bug, creation_ts => $timestamp, - data => scalar $cgi->param('attachurl') || $cgi->upload('data'), + data => scalar $cgi->param('attach_text') || $cgi->upload('data'), description => scalar $cgi->param('description'), - filename => $cgi->param('attachurl') ? '' : scalar $cgi->upload('data'), + filename => $cgi->param('attach_text') ? 'attachment.txt' : scalar $cgi->upload('data'), ispatch => scalar $cgi->param('ispatch'), isprivate => scalar $cgi->param('isprivate'), - isurl => scalar $cgi->param('attachurl'), mimetype => $content_type, }); }; |