]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1064933: Bugzilla.pm does not compile without Text::Markdown
authorKoosha KM <koosha.khajeh@gmail.com>
Thu, 11 Sep 2014 13:55:01 +0000 (13:55 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Thu, 11 Sep 2014 13:55:01 +0000 (13:55 +0000)
r=glob,a=sgreen

Bugzilla.pm
Bugzilla/Markdown.pm
Bugzilla/Template.pm

index 7d935db4808cdf65869f09bf6ae4b338f3c16668..af670e90f4beaf82caaea2b7babdd2f4c6c7f2e4 100644 (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();
 }
index 6cbe0f6c4898df9468982ed88518ee44462d4a9b..5f1a7d955beea33594e776540fbcb6986486b166 100644 (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, @_);
index 78a3e41202a0e0cfd0a4404fa153d28ba0c3c267..aee7933edee4490e627c605ef92ff55d58245465 100644 (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);
                                   }