Commit 3159cf5b authored by Florent Guillaume's avatar Florent Guillaume

Merged 40389 from 2.9 branch:

Use ObjectCopiedEvent with an 'original' parameter.
parent a1077042
......@@ -37,7 +37,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
......@@ -215,9 +214,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)
......@@ -390,9 +390,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)
......
......@@ -53,7 +53,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