]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1114411: Do not call replyToMarkdownComment() if user pref use_markdown = off
authorFrédéric Buclin <LpSolit@gmail.com>
Mon, 22 Dec 2014 22:59:04 +0000 (23:59 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 22 Dec 2014 22:59:04 +0000 (23:59 +0100)
r/a=dkl

template/en/default/bug/comments.html.tmpl

index 0c7408a4874bc36f0bbe7b0248cfaa6d76512e83..1281bb6df5757b86f8ee6ae383a7e58a161bc3ea 100644 (file)
@@ -18,6 +18,7 @@
 
 [% DEFAULT mode = "show" %]
 [% user_cache = template_cache.users %]
+[% markdown_enabled = feature_enabled('jsonrpc') AND user.settings.use_markdown.value == "on" %]
 
 <!-- This auto-sizes the comments and positions the collapse/expand links 
      to the right. -->
               [<a class="bz_reply_link" href="#add_comment"
                 [% IF user.settings.quote_replies.value != 'off' %]
                   onclick="
-                  [% IF feature_enabled('jsonrpc') && comment.is_markdown %]
+                  [% IF markdown_enabled AND comment.is_markdown %]
                     replyToMarkdownComment('[% comment.count %]', '[% comment.id %]', '[% replyto_header FILTER js %]'); return false;"
                   [% ELSE %]
                     replyToComment('[% comment.count %]', '[% comment.id %]', '[% replyto_header FILTER js %]', null); return false;"