Commit 5c29ffa8 authored by Chris McDonough's avatar Chris McDonough

Collector 2257, rename deleted existing object before creating new object,...

Collector 2257, rename deleted existing object before creating new object, causing manage_beforeDelete to do the wrong thing in some corner cases specific to user code which depended on it specifically *not* doing this.
parent dc01d2e4
......@@ -83,7 +83,7 @@
#
##############################################################################
__doc__="""Copy interface"""
__version__='$Revision: 1.72 $'[11:-2]
__version__='$Revision: 1.73 $'[11:-2]
import sys, string, Globals, Moniker, tempfile, ExtensionClass
from marshal import loads, dumps
......@@ -305,13 +305,13 @@ class CopyContainer(ExtensionClass.Base):
title='Rename Error',
message=sys.exc_info()[1],
action ='manage_main')
self._delObject(id)
ob = aq_base(ob)
ob._setId(new_id)
# Note - because a rename always keeps the same context, we
# can just leave the ownership info unchanged.
self._setObject(new_id, ob, set_owner=0)
self._delObject(id)
if REQUEST is not None:
return self.manage_main(self, REQUEST, update_menu=1)
......
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