merge r46437 and r46946 from davisagli-features: respect the per-comment mime_type setting, and use the old cooked text/html from legacy comments when migrating

svn path=/plone.app.discussion/trunk/; revision=48356
This commit is contained in:
David Glick
2011-04-02 19:51:37 +00:00
parent bf5946367a
commit eb004aab44
11 changed files with 79 additions and 47 deletions
-11
View File
@@ -271,17 +271,6 @@ class CommentsViewlet(ViewletBase):
# view methods
def cook(self, text):
transforms = getToolByName(self, 'portal_transforms')
targetMimetype = 'text/html'
registry = queryUtility(IRegistry)
settings = registry.forInterface(IDiscussionSettings, check=False)
mimetype = settings.text_transform
return transforms.convertTo(targetMimetype,
text,
context=self,
mimetype=mimetype).getData()
def can_reply(self):
"""Returns true if current user has the 'Reply to item' permission.
"""