diff options
author | mkanat%bugzilla.org <> | 2009-12-13 21:56:44 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-12-13 21:56:44 +0100 |
commit | 9d11a0d5090509137c1e94942159dcfe59fc61d9 (patch) | |
tree | 26bcba5b9ebe915f4383d2d799d3d62f275e94ed /attachment.cgi | |
parent | 63b76161d5c839fe1922eeb4e762b7dece1daa4a (diff) | |
download | bugzilla-9d11a0d5090509137c1e94942159dcfe59fc61d9.tar.gz bugzilla-9d11a0d5090509137c1e94942159dcfe59fc61d9.tar.xz |
Bug 526734: Allow localization of the "From update of attachment" string in comments
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-x | attachment.cgi | 12 |
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) { |