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
2aa227f6
Commit
2aa227f6
authored
Sep 21, 1998
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for pasting of "Product" based objects
parent
fbf3b1b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
13 deletions
+29
-13
lib/python/OFS/CopySupport.py
lib/python/OFS/CopySupport.py
+29
-13
No files found.
lib/python/OFS/CopySupport.py
View file @
2aa227f6
__doc__
=
"""Copy interface"""
__doc__
=
"""Copy interface"""
__version__
=
'$Revision: 1.2
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
1
$'
[
11
:
-
2
]
import
sys
,
Globals
,
Moniker
,
tempfile
import
sys
,
string
,
Globals
,
Moniker
,
tempfile
from
marshal
import
loads
,
dumps
from
marshal
import
loads
,
dumps
from
urllib
import
quote
,
unquote
from
urllib
import
quote
,
unquote
from
zlib
import
compress
,
decompress
from
zlib
import
compress
,
decompress
...
@@ -215,8 +215,21 @@ class CopyContainer:
...
@@ -215,8 +215,21 @@ class CopyContainer:
method_name
=
d
[
'action'
]
method_name
=
d
[
'action'
]
break
break
if
method_name
is
not
None
:
if
method_name
is
not
None
:
if
hasattr
(
self
,
method_name
):
if
hasattr
(
self
,
method_name
):
meth
=
getattr
(
self
,
method_name
)
meth
=
getattr
(
self
,
method_name
)
else
:
# Handle strange names that come from the Product
# machinery ;(
mn
=
string
.
split
(
method_name
,
'/'
)
if
len
(
mn
)
>
1
:
pname
=
mn
[
1
]
product
=
self
.
aq_acquire
(
'_getProducts'
)().
_product
(
pname
)
fname
=
mn
[
2
]
factory
=
getattr
(
product
,
fname
)
meth
=
getattr
(
factory
,
factory
.
initial
)
if
hasattr
(
meth
,
'__roles__'
):
if
hasattr
(
meth
,
'__roles__'
):
roles
=
meth
.
__roles__
roles
=
meth
.
__roles__
user
=
REQUEST
.
get
(
'AUTHENTICATED_USER'
,
None
)
user
=
REQUEST
.
get
(
'AUTHENTICATED_USER'
,
None
)
...
@@ -382,6 +395,9 @@ eNotSupported=fMessageDialog(
...
@@ -382,6 +395,9 @@ eNotSupported=fMessageDialog(
##############################################################################
##############################################################################
#
#
# $Log: CopySupport.py,v $
# $Log: CopySupport.py,v $
# Revision 1.21 1998/09/21 20:01:50 brian
# Added support for pasting of "Product" based objects
#
# Revision 1.20 1998/08/26 18:33:44 brian
# Revision 1.20 1998/08/26 18:33:44 brian
# Updated permissions in Folder folder for the copy/paste methods and added
# Updated permissions in Folder folder for the copy/paste methods and added
# cvs log to Folder.py
# cvs log to Folder.py
...
...
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