summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
authorAlbert Ting <altlist@gmail.com>2016-01-02 22:29:01 +0100
committerDylan Hardison <dylan@mozilla.com>2016-01-02 22:29:01 +0100
commit9f5a8a28783f66b15973ac3714d10d1c0fa05f6d (patch)
tree2a147598124d8003bb051f717cd50a7d992e030c /attachment.cgi
parent8f405c09b2ef1db943aaea9201785d93cd35f86e (diff)
downloadbugzilla-9f5a8a28783f66b15973ac3714d10d1c0fa05f6d.tar.gz
bugzilla-9f5a8a28783f66b15973ac3714d10d1c0fa05f6d.tar.xz
Bug 1202853 - Markdown doesn't work when adding a comment attachment
r=dylan,a=dylan
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi5
1 files changed, 4 insertions, 1 deletions
diff --git a/attachment.cgi b/attachment.cgi
index e7fadf66f..ae9efef6a 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -548,9 +548,12 @@ sub insert {
# Insert a comment about the new attachment into the database.
my $comment = $cgi->param('comment');
$comment = '' unless defined $comment;
+ my $is_markdown = ($user->use_markdown
+ && $cgi->param('use_markdown')) ? 1 : 0;
$bug->add_comment($comment, { isprivate => $attachment->isprivate,
type => CMT_ATTACHMENT_CREATED,
- extra_data => $attachment->id });
+ extra_data => $attachment->id,
+ is_markdown => $is_markdown});
# Assign the bug to the user, if they are allowed to take it
my $owner = "";