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

r=glob,a=sgreen


git-svn-id: svn://10.0.0.236/trunk@265569 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org 2014-09-11 14:15:50 +00:00
parent d923c725d9
commit 7e8397d7b5
5 changed files with 8 additions and 6 deletions

View File

@ -1 +1 @@
9133
9134

View File

@ -1 +1 @@
e1603d01bbc3523b622db2f295400aa5a5f14509
c11b241b985511c01803df200d31afb793f11903

View File

@ -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();
}

View File

@ -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, @_);

View File

@ -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);
}