From 9d11a0d5090509137c1e94942159dcfe59fc61d9 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sun, 13 Dec 2009 20:56:44 +0000 Subject: Bug 526734: Allow localization of the "From update of attachment" string in comments Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- attachment.cgi | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'attachment.cgi') 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) { -- cgit v1.2.3-24-g4f1b