Skip to content

Commit

Permalink
Merged Five 1.2 branch changeset 20253:
Browse files Browse the repository at this point in the history
Send ContainerModifiedEvent when appropriate.

This requires Five 1.3+ >= r20254.

Some BBB has been kept until Zope 3.2 >= r40368 is stiched in.
  • Loading branch information
Florent Guillaume committed Nov 25, 2005
1 parent ae034d5 commit 58c2361
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions BTreeFolder2.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from zope.event import notify
from zope.app.container.contained import ObjectAddedEvent
from zope.app.container.contained import ObjectRemovedEvent
from zope.app.container.contained import notifyContainerModified
from OFS.event import ObjectWillBeAddedEvent
from OFS.event import ObjectWillBeRemovedEvent
import OFS.subscribers
Expand Down Expand Up @@ -443,6 +444,7 @@ def _setObject(self, id, object, roles=None, user=None, set_owner=1,

if not suppress_events:
notify(ObjectAddedEvent(ob, self, id))
notifyContainerModified(self)

OFS.subscribers.compatibilityCall('manage_afterAdd', ob, ob, self)

Expand All @@ -461,6 +463,7 @@ def _delObject(self, id, dp=1, suppress_events=False):

if not suppress_events:
notify(ObjectRemovedEvent(ob, self, id))
notifyContainerModified(self)


# Aliases for mapping-like access.
Expand Down

0 comments on commit 58c2361

Please sign in to comment.