summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Comment.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-06-15 00:54:24 +0200
committerGitHub <noreply@github.com>2018-06-15 00:54:24 +0200
commit69e02e0576fc834de982ab6fa3d5b77ce7fe472a (patch)
treefd3b6d495c9869f5550cbccf60618d8e66b5ba14 /Bugzilla/Comment.pm
parent9af546bb69ad8d0d61d7575b284c28825a0056fe (diff)
downloadbugzilla-69e02e0576fc834de982ab6fa3d5b77ce7fe472a.tar.gz
bugzilla-69e02e0576fc834de982ab6fa3d5b77ce7fe472a.tar.xz
Bug 1468818 - Re-introduce is_markdown to the Bugzilla::Comment model
Diffstat (limited to 'Bugzilla/Comment.pm')
-rw-r--r--Bugzilla/Comment.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/Bugzilla/Comment.pm b/Bugzilla/Comment.pm
index f9a6f7d3a..00c7115e4 100644
--- a/Bugzilla/Comment.pm
+++ b/Bugzilla/Comment.pm
@@ -45,6 +45,7 @@ use constant DB_COLUMNS => qw(
already_wrapped
type
extra_data
+ is_markdown
);
use constant UPDATE_COLUMNS => qw(
@@ -67,6 +68,7 @@ use constant VALIDATORS => {
work_time => \&_check_work_time,
thetext => \&_check_thetext,
isprivate => \&_check_isprivate,
+ is_markdown => \&Bugzilla::Object::check_boolean,
extra_data => \&_check_extra_data,
type => \&_check_type,
};
@@ -233,6 +235,7 @@ sub body { return $_[0]->{'thetext'}; }
sub bug_id { return $_[0]->{'bug_id'}; }
sub creation_ts { return $_[0]->{'bug_when'}; }
sub is_private { return $_[0]->{'isprivate'}; }
+sub is_markdown { return $_[0]->{'is_markdown'}; }
sub work_time {
# Work time is returned as a string (see bug 607909)
return 0 if $_[0]->{'work_time'} + 0 == 0;
@@ -336,6 +339,7 @@ sub body_full {
sub set_is_private { $_[0]->set('isprivate', $_[1]); }
sub set_type { $_[0]->set('type', $_[1]); }
sub set_extra_data { $_[0]->set('extra_data', $_[1]); }
+sub set_is_markdown { $_[0]->set('is_markdown', $_[1]); }
sub add_tag {
my ($self, $tag) = @_;
@@ -576,6 +580,10 @@ C<string> Time spent as related to this comment.
C<boolean> Comment is marked as private.
+=item C<is_markdown>
+
+C<boolean> Whether this comment needs Markdown rendering to be applied.
+
=item C<already_wrapped>
If this comment is stored in the database word-wrapped, this will be C<1>.