This commit is contained in:
Timo Stollenwerk 2012-01-13 10:16:01 +01:00
parent bbc70ede54
commit 07cde3ca7b

View File

@ -39,7 +39,8 @@ class View(BrowserView):
""" """
context = aq_inner(self.context) context = aq_inner(self.context)
workflowTool = getToolByName(context, 'portal_workflow') workflowTool = getToolByName(context, 'portal_workflow')
comment_workflow = workflowTool.getChainForPortalType('Discussion Item') comment_workflow = workflowTool.getChainForPortalType(
'Discussion Item')
if comment_workflow: if comment_workflow:
comment_workflow = comment_workflow[0] comment_workflow = comment_workflow[0]
comment_workflow = workflowTool[comment_workflow] comment_workflow = workflowTool[comment_workflow]
@ -57,7 +58,8 @@ class ModerateCommentsEnabled(BrowserView):
""" """
context = aq_inner(self.context) context = aq_inner(self.context)
workflowTool = getToolByName(context, 'portal_workflow', None) workflowTool = getToolByName(context, 'portal_workflow', None)
comment_workflow = workflowTool.getChainForPortalType('Discussion Item') comment_workflow = workflowTool.getChainForPortalType(
'Discussion Item')
if comment_workflow: if comment_workflow:
comment_workflow = comment_workflow[0] comment_workflow = comment_workflow[0]
comment_workflow = workflowTool[comment_workflow] comment_workflow = workflowTool[comment_workflow]
@ -140,6 +142,7 @@ class PublishComment(BrowserView):
came_from = content_object.absolute_url() came_from = content_object.absolute_url()
return self.context.REQUEST.RESPONSE.redirect(came_from) return self.context.REQUEST.RESPONSE.redirect(came_from)
class BulkActionsView(BrowserView): class BulkActionsView(BrowserView):
"""Bulk actions (unapprove, approve, delete, mark as spam). """Bulk actions (unapprove, approve, delete, mark as spam).