summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi9
1 files changed, 4 insertions, 5 deletions
diff --git a/attachment.cgi b/attachment.cgi
index a10d9f970..a89a46b99 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -483,11 +483,10 @@ sub insert {
$attachment->update($timestamp);
# Insert a comment about the new attachment into the database.
- my $comment = "Created an attachment (id=" . $attachment->id . ")\n" .
- $attachment->description . "\n";
- $comment .= ("\n" . $cgi->param('comment')) if defined $cgi->param('comment');
-
- $bug->add_comment($comment, { isprivate => $attachment->isprivate });
+ my $comment = $cgi->param('comment');
+ $bug->add_comment($comment, { isprivate => $attachment->isprivate,
+ type => CMT_ATTACHMENT_CREATED,
+ extra_data => $attachment->id });
# Assign the bug to the user, if they are allowed to take it
my $owner = "";