Commit ef20ae0f authored by Florent Guillaume's avatar Florent Guillaume

Use ObjectCopiedEvent with an 'original' parameter.

parent 06bb5ef8
......@@ -33,7 +33,6 @@ from zope.interface import implements
from zope.event import notify
from zope.app.event.objectevent import ObjectCopiedEvent
from zope.app.container.contained import ObjectMovedEvent
import Products.Five # BBB: until Zope 3.2 >= r40368 is stiched in
from zope.app.container.contained import notifyContainerModified
from OFS.event import ObjectWillBeMovedEvent
from OFS.event import ObjectClonedEvent
......@@ -214,9 +213,10 @@ class CopyContainer(ExtensionClass.Base):
id = self._get_id(orig_id)
result.append({'id': orig_id, 'new_id': id})
orig_ob = ob
ob = ob._getCopy(self)
ob._setId(id)
notify(ObjectCopiedEvent(ob))
notify(ObjectCopiedEvent(ob, orig_ob))
self._setObject(id, ob)
ob = self._getOb(id)
......@@ -385,9 +385,10 @@ class CopyContainer(ExtensionClass.Base):
message=sys.exc_info()[1],
action='manage_main')
orig_ob = ob
ob = ob._getCopy(self)
ob._setId(id)
notify(ObjectCopiedEvent(ob))
notify(ObjectCopiedEvent(ob, orig_ob))
self._setObject(id, ob)
ob = self._getOb(id)
......
......@@ -46,7 +46,6 @@ from Traversable import Traversable
from zope.event import notify
from zope.app.container.contained import ObjectAddedEvent
from zope.app.container.contained import ObjectRemovedEvent
import Products.Five # BBB: until Zope 3.2 >= r40368 is stiched in
from zope.app.container.contained import notifyContainerModified
from OFS.event import ObjectWillBeAddedEvent
from OFS.event import ObjectWillBeRemovedEvent
......
......@@ -24,7 +24,6 @@ from Acquisition import aq_base
from DocumentTemplate.sequence import sort
from Globals import InitializeClass
from zope.interface import implements
import Products.Five # BBB: until Zope 3.2 >= r40368 is stiched in
from zope.app.container.contained import notifyContainerModified
from interfaces import IOrderedContainer as z3IOrderedContainer
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment