summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi12
1 files changed, 5 insertions, 7 deletions
diff --git a/attachment.cgi b/attachment.cgi
index a89a46b99..bc1cb90f7 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -616,13 +616,11 @@ sub update {
# If the user submitted a comment while editing the attachment,
# add the comment to the bug. Do this after having validated isprivate!
- if ($cgi->param('comment')) {
- # Prepend a string to the comment to let users know that the comment came
- # from the "edit attachment" screen.
- my $comment = "(From update of attachment " . $attachment->id . ")\n" .
- $cgi->param('comment');
-
- $bug->add_comment($comment, { isprivate => $attachment->isprivate });
+ my $comment = $cgi->param('comment');
+ if (trim($comment)) {
+ $bug->add_comment($comment, { isprivate => $attachment->isprivate,
+ type => CMT_ATTACHMENT_UPDATED,
+ extra_data => $attachment->id });
}
if ($can_edit) {