Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
55e17f0e
Commit
55e17f0e
authored
Feb 18, 2005
by
Christian Heimes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #1705: CopySource._postCopy is never called
parent
64b0392c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/OFS/CopySupport.py
lib/python/OFS/CopySupport.py
+13
-8
No files found.
doc/CHANGES.txt
View file @
55e17f0e
...
...
@@ -60,6 +60,8 @@ Zope Changes
Bugs fixed
- Collector #1705: CopySource._postCopy is never called
- Collector #1617: Fixed crash in ZPT code (caused by improper
checks in cAccessControl)
...
...
lib/python/OFS/CopySupport.py
View file @
55e17f0e
...
...
@@ -49,11 +49,11 @@ class CopyContainer(ExtensionClass.Base):
def
_setOb
(
self
,
id
,
object
):
setattr
(
self
,
id
,
object
)
def
_delOb
(
self
,
id
):
delattr
(
self
,
id
)
def
_getOb
(
self
,
id
,
default
=
_marker
):
self
=
aq_base
(
self
)
if
default
is
_marker
:
return
getattr
(
self
,
id
)
try
:
return
getattr
(
self
,
id
)
except
:
return
default
if
hasattr
(
aq_base
(
self
),
id
):
return
getattr
(
self
,
id
)
if
default
is
_marker
:
raise
AttributeError
,
id
return
default
def
manage_CopyContainerFirstItem
(
self
,
REQUEST
):
return
self
.
_getOb
(
REQUEST
[
'ids'
][
0
])
...
...
@@ -178,6 +178,7 @@ class CopyContainer(ExtensionClass.Base):
ob
.
_setId
(
id
)
self
.
_setObject
(
id
,
ob
)
ob
=
self
.
_getOb
(
id
)
ob
.
_postCopy
(
self
,
op
=
0
)
ob
.
manage_afterClone
(
ob
)
ob
.
wl_clearLocks
()
...
...
@@ -208,12 +209,13 @@ class CopyContainer(ExtensionClass.Base):
orig_id
=
id
id
=
self
.
_get_id
(
id
)
result
.
append
({
'id'
:
orig_id
,
'new_id'
:
id
})
ob
.
_setId
(
id
)
ob
.
_setId
(
id
)
self
.
_setObject
(
id
,
ob
,
set_owner
=
0
)
ob
=
self
.
_getOb
(
id
)
ob
.
_postCopy
(
self
,
op
=
1
)
# try to make ownership implicit if possible
ob
=
self
.
_getOb
(
id
)
ob
.
manage_changeOwnershipType
(
explicit
=
0
)
if
REQUEST
is
not
None
:
...
...
@@ -264,6 +266,8 @@ class CopyContainer(ExtensionClass.Base):
# 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
)
ob
=
self
.
_getOb
(
new_id
)
ob
.
_postCopy
(
self
,
op
=
1
)
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
...
...
@@ -292,7 +296,8 @@ class CopyContainer(ExtensionClass.Base):
ob
=
ob
.
_getCopy
(
self
)
ob
.
_setId
(
id
)
self
.
_setObject
(
id
,
ob
)
ob
=
ob
.
__of__
(
self
)
ob
=
self
.
_getOb
(
id
)
ob
.
_postCopy
(
self
,
op
=
0
)
ob
.
manage_afterClone
(
ob
)
return
ob
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment