$bug->add_comment(
$comment,
{
- isprivate => $attachment->isprivate,
- type => CMT_ATTACHMENT_CREATED,
- extra_data => $attachment->id,
- is_markdown => Bugzilla->params->{use_markdown} ? 1 : 0
+ isprivate => $attachment->isprivate,
+ type => CMT_ATTACHMENT_CREATED,
+ extra_data => $attachment->id,
+ is_markdown => Bugzilla->params->{use_markdown} ? 1 : 0,
}
);
# If the user submitted a comment while editing the attachment,
# add the comment to the bug. Do this after having validated isprivate!
my $comment = $cgi->param('comment');
+ my $is_markdown = Bugzilla->params->{use_markdown} ? 1 : 0;
+ if ($cgi->param('markdown_off')) {
+ $is_markdown = 0;
+ }
if (defined $comment && trim($comment) ne '') {
$bug->add_comment(
$comment,
{
- isprivate => $attachment->isprivate,
- type => CMT_ATTACHMENT_UPDATED,
- extra_data => $attachment->id,
- is_markdown => Bugzilla->params->{use_markdown} ? 1 : 0
+ isprivate => $attachment->isprivate,
+ type => CMT_ATTACHMENT_UPDATED,
+ extra_data => $attachment->id,
+ is_markdown => $is_markdown,
}
);
}