[Zope-Checkins] SVN: Zope/branches/2.10/ Merged r69717:69724 from 2.9 branch.

Stefan H. Holek stefan at epy.co.at
Tue Aug 22 06:55:39 EDT 2006


Log message for revision 69725:
  Merged r69717:69724 from 2.9 branch.
  
  webdav.Resource.COPY did not send ObjectClonedEvent.
  Fixes http://www.zope.org/Collectors/Zope/2169
  

Changed:
  U   Zope/branches/2.10/doc/CHANGES.txt
  A   Zope/branches/2.10/lib/python/OFS/tests/testCopySupportHooks.py
  U   Zope/branches/2.10/lib/python/webdav/Resource.py

-=-
Modified: Zope/branches/2.10/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.10/doc/CHANGES.txt	2006-08-22 10:34:07 UTC (rev 69724)
+++ Zope/branches/2.10/doc/CHANGES.txt	2006-08-22 10:55:38 UTC (rev 69725)
@@ -8,6 +8,8 @@
 
     Bugs fixed
 
+      - Collector #2169: webdav.Resource.COPY did not send ObjectClonedEvent.
+
   Zope 2.10.0 beta 2 (2006/08/20)
 
     Bugs Fixed

Copied: Zope/branches/2.10/lib/python/OFS/tests/testCopySupportHooks.py (from rev 69724, Zope/branches/2.9/lib/python/OFS/tests/testCopySupportHooks.py)

Modified: Zope/branches/2.10/lib/python/webdav/Resource.py
===================================================================
--- Zope/branches/2.10/lib/python/webdav/Resource.py	2006-08-22 10:34:07 UTC (rev 69724)
+++ Zope/branches/2.10/lib/python/webdav/Resource.py	2006-08-22 10:55:38 UTC (rev 69725)
@@ -45,7 +45,11 @@
 from interfaces import IWriteLock
 from WriteLockInterface import WriteLockInterface
 
+from zope.event import notify
+from OFS.event import ObjectClonedEvent
+import OFS.subscribers
 
+
 class Resource(ExtensionClass.Base, Lockable.LockableItem):
 
     """The Resource mixin class provides basic WebDAV support for
@@ -399,7 +403,11 @@
         parent._setObject(name, ob)
         ob = parent._getOb(name)
         ob._postCopy(parent, op=0)
-        ob.manage_afterClone(ob)
+
+        OFS.subscribers.compatibilityCall('manage_afterClone', ob, ob)
+
+        notify(ObjectClonedEvent(ob))
+
         # We remove any locks from the copied object because webdav clients
         # don't track the lock status and the lock token for copied resources
         ob.wl_clearLocks()



More information about the Zope-Checkins mailing list