Test
This commit is contained in:
@@ -30,7 +30,6 @@ from Products.CMFPlone.interfaces import IHideFromBreadcrumbs
|
||||
from zope.annotation.interfaces import IAnnotatable
|
||||
from zope.annotation.interfaces import IAnnotations
|
||||
from zope.component import adapter
|
||||
from zope.component import adapts
|
||||
from zope.container.contained import ContainerModifiedEvent
|
||||
from zope.event import notify
|
||||
from zope.interface import implementer
|
||||
@@ -325,13 +324,13 @@ else:
|
||||
return conversationAdapterFactory(content)
|
||||
|
||||
|
||||
@adapter(Conversation) # relies on implementation details
|
||||
@implementer(IReplies)
|
||||
class ConversationReplies(object):
|
||||
"""An IReplies adapter for conversations.
|
||||
|
||||
This makes it easy to work with top-level comments.
|
||||
"""
|
||||
adapts(Conversation) # relies on implementation details
|
||||
|
||||
def __init__(self, context):
|
||||
self.conversation = context
|
||||
@@ -401,6 +400,7 @@ class ConversationReplies(object):
|
||||
return self.conversation._children.get(self.comment_id, LLSet())
|
||||
|
||||
|
||||
@adapter(Comment)
|
||||
@implementer(IReplies)
|
||||
class CommentReplies(ConversationReplies):
|
||||
"""An IReplies adapter for comments.
|
||||
@@ -412,8 +412,6 @@ class CommentReplies(ConversationReplies):
|
||||
# most likely, anyone writing a different type of Conversation will also
|
||||
# have a different type of Comment
|
||||
|
||||
adapts(Comment)
|
||||
|
||||
def __init__(self, context):
|
||||
self.comment = context
|
||||
self.conversation = aq_parent(self.comment)
|
||||
|
||||
Reference in New Issue
Block a user