Commit c11b241b authored by Koosha KM's avatar Koosha KM Committed by David Lawrence

Bug 1064933: Bugzilla.pm does not compile without Text::Markdown

r=glob,a=sgreen
parent e1603d01
......@@ -398,6 +398,8 @@ sub logout_request {
}
sub markdown {
return if !Bugzilla->feature('markdown');
require Bugzilla::Markdown;
return $_[0]->request_cache->{markdown} ||= Bugzilla::Markdown->new();
}
......
......@@ -62,8 +62,7 @@ sub markdown {
my $text = shift;
my $user = Bugzilla->user;
if (Bugzilla->feature('markdown')
&& $user->settings->{use_markdown}->{is_enabled}
if ($user->settings->{use_markdown}->{is_enabled}
&& $user->setting('use_markdown') eq 'on')
{
return $self->SUPER::markdown($text, @_);
......
......@@ -813,8 +813,9 @@ sub create {
my $text = shift;
return unless $text;
if ((ref($comment) eq 'HASH' && $comment->{is_markdown})
|| (ref($comment) eq 'Bugzilla::Comment' && $comment->is_markdown))
if (Bugzilla->feature('markdown')
&& ((ref($comment) eq 'HASH' && $comment->{is_markdown})
|| (ref($comment) eq 'Bugzilla::Comment' && $comment->is_markdown)))
{
return Bugzilla->markdown->markdown($text);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment