Moved the indexing to be a catalog wrapper.

svn path=/plone.app.discussion/trunk/; revision=27005
This commit is contained in:
Lennart Regebro
2009-05-17 18:38:45 +00:00
parent e35f761939
commit acf00c9de9
6 changed files with 73 additions and 48 deletions
+6 -1
View File
@@ -115,7 +115,9 @@ class Conversation(Persistent, Explicit):
if not reply_to in self._children:
self._children[reply_to] = LLSet()
self._children[reply_to].insert(id)
notify(ObjectAddedEvent(comment, self, id))
# Notify that the object is added. The object must here be
# acquisition wrapped or the indexing will fail.
notify(ObjectAddedEvent(comment.__of__(self), self, id))
notify(ContainerModifiedEvent(self))
# Dict API
@@ -137,6 +139,9 @@ class Conversation(Persistent, Explicit):
def keys(self):
return self._comments.keys()
def getPhysicalPath(self):
return self.aq_parent.getPhysicalPath() + (self.id,)
# TODO: Update internal data structures when items added or removed
@implementer(IConversation)