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
ceef7bf6
Commit
ceef7bf6
authored
Apr 16, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merged fix to use BASEPATH in clipboard cookie
parent
3358ddba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
lib/python/OFS/CopySupport.py
lib/python/OFS/CopySupport.py
+8
-4
No files found.
lib/python/OFS/CopySupport.py
View file @
ceef7bf6
...
...
@@ -83,7 +83,7 @@
#
##############################################################################
__doc__
=
"""Copy interface"""
__version__
=
'$Revision: 1.7
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.7
1
$'
[
11
:
-
2
]
import
sys
,
string
,
Globals
,
Moniker
,
tempfile
,
ExtensionClass
from
marshal
import
loads
,
dumps
...
...
@@ -144,7 +144,7 @@ class CopyContainer(ExtensionClass.Base):
cp
=
_cb_encode
(
cp
)
if
REQUEST
is
not
None
:
resp
=
REQUEST
[
'RESPONSE'
]
resp
.
setCookie
(
'__cp'
,
cp
,
path
=
'%s'
%
REQUEST
[
'SCRIPT_NAME'
]
)
resp
.
setCookie
(
'__cp'
,
cp
,
path
=
'%s'
%
cookie_path
(
REQUEST
)
)
REQUEST
[
'__cp'
]
=
cp
return
self
.
manage_main
(
self
,
REQUEST
)
return
cp
...
...
@@ -169,7 +169,7 @@ class CopyContainer(ExtensionClass.Base):
cp
=
_cb_encode
(
cp
)
if
REQUEST
is
not
None
:
resp
=
REQUEST
[
'RESPONSE'
]
resp
.
setCookie
(
'__cp'
,
cp
,
path
=
'%s'
%
REQUEST
[
'SCRIPT_NAME'
]
)
resp
.
setCookie
(
'__cp'
,
cp
,
path
=
'%s'
%
cookie_path
(
REQUEST
)
)
REQUEST
[
'__cp'
]
=
cp
return
self
.
manage_main
(
self
,
REQUEST
)
return
cp
...
...
@@ -267,7 +267,7 @@ class CopyContainer(ExtensionClass.Base):
if
REQUEST
is
not
None
:
REQUEST
[
'RESPONSE'
].
setCookie
(
'__cp'
,
'deleted'
,
path
=
'%s'
%
REQUEST
[
'SCRIPT_NAME'
]
,
path
=
'%s'
%
cookie_path
(
REQUEST
)
,
expires
=
'Wed, 31-Dec-97 23:59:59 GMT'
)
REQUEST
[
'__cp'
]
=
None
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
,
...
...
@@ -524,6 +524,10 @@ def _cb_encode(d):
def
_cb_decode
(
s
):
return
loads
(
decompress
(
unquote
(
s
)))
def
cookie_path
(
request
):
# Return a "path" value for use in a cookie that refers
# to the root of the Zope object space.
return
request
[
'BASEPATH1'
]
or
"/"
...
...
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