[Zope-Checkins] SVN: Zope/trunk/lib/python/OFS/ Merged 40389 from
2.9 branch:
Florent Guillaume
fg at nuxeo.com
Mon Nov 28 10:35:31 EST 2005
Log message for revision 40390:
Merged 40389 from 2.9 branch:
Use ObjectCopiedEvent with an 'original' parameter.
Changed:
U Zope/trunk/lib/python/OFS/CopySupport.py
U Zope/trunk/lib/python/OFS/ObjectManager.py
U Zope/trunk/lib/python/OFS/OrderSupport.py
-=-
Modified: Zope/trunk/lib/python/OFS/CopySupport.py
===================================================================
--- Zope/trunk/lib/python/OFS/CopySupport.py 2005-11-28 15:28:49 UTC (rev 40389)
+++ Zope/trunk/lib/python/OFS/CopySupport.py 2005-11-28 15:35:28 UTC (rev 40390)
@@ -37,7 +37,6 @@
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 @@
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 @@
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)
Modified: Zope/trunk/lib/python/OFS/ObjectManager.py
===================================================================
--- Zope/trunk/lib/python/OFS/ObjectManager.py 2005-11-28 15:28:49 UTC (rev 40389)
+++ Zope/trunk/lib/python/OFS/ObjectManager.py 2005-11-28 15:35:28 UTC (rev 40390)
@@ -53,7 +53,6 @@
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
Modified: Zope/trunk/lib/python/OFS/OrderSupport.py
===================================================================
--- Zope/trunk/lib/python/OFS/OrderSupport.py 2005-11-28 15:28:49 UTC (rev 40389)
+++ Zope/trunk/lib/python/OFS/OrderSupport.py 2005-11-28 15:35:28 UTC (rev 40390)
@@ -24,7 +24,6 @@
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
More information about the Zope-Checkins
mailing list