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
21a5406c
Commit
21a5406c
authored
Jul 05, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unified handling of confirm messages for import/export objects
parent
37c5e8d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
lib/python/OFS/ObjectManager.py
lib/python/OFS/ObjectManager.py
+10
-11
No files found.
lib/python/OFS/ObjectManager.py
View file @
21a5406c
...
@@ -84,9 +84,9 @@
...
@@ -84,9 +84,9 @@
##############################################################################
##############################################################################
__doc__
=
"""Object Manager
__doc__
=
"""Object Manager
$Id: ObjectManager.py,v 1.1
39 2001/07/05 13:19:02
andreas Exp $"""
$Id: ObjectManager.py,v 1.1
40 2001/07/05 15:44:50
andreas Exp $"""
__version__
=
'$Revision: 1.1
39
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
40
$'
[
11
:
-
2
]
import
App.Management
,
Acquisition
,
Globals
,
CopySupport
,
Products
import
App.Management
,
Acquisition
,
Globals
,
CopySupport
,
Products
import
os
,
App
.
FactoryDispatcher
,
re
,
Products
import
os
,
App
.
FactoryDispatcher
,
re
,
Products
...
@@ -521,7 +521,7 @@ class ObjectManager(
...
@@ -521,7 +521,7 @@ class ObjectManager(
return
r
return
r
def
manage_exportObject
(
self
,
id
=
''
,
download
=
None
,
toxml
=
None
,
def
manage_exportObject
(
self
,
id
=
''
,
download
=
None
,
toxml
=
None
,
RESPONSE
=
None
):
RESPONSE
=
None
,
REQUEST
=
None
):
"""Exports an object to a file and returns that file."""
"""Exports an object to a file and returns that file."""
if
not
id
:
if
not
id
:
# can't use getId() here (breaks on "old" exported objects)
# can't use getId() here (breaks on "old" exported objects)
...
@@ -547,12 +547,13 @@ class ObjectManager(
...
@@ -547,12 +547,13 @@ class ObjectManager(
XMLExportImport
.
exportXML
(
ob
.
_p_jar
,
ob
.
_p_oid
,
f
)
XMLExportImport
.
exportXML
(
ob
.
_p_jar
,
ob
.
_p_oid
,
f
)
else
:
else
:
ob
.
_p_jar
.
exportFile
(
ob
.
_p_oid
,
f
)
ob
.
_p_jar
.
exportFile
(
ob
.
_p_oid
,
f
)
if
RESPONSE
is
not
None
:
return
MessageDialog
(
if
REQUEST
is
not
None
:
title
=
"Object exported"
,
return
self
.
manage_main
(
self
,
REQUEST
,
message
=
"<EM>%s</EM> sucessfully
\
manage_tabs_message
=
exported to <pre>%s</pre>."
%
(
id
,
f
),
'<em>%s</em> sucessfully exported to <em>%s</em>'
%
(
id
,
f
),
action
=
"manage_main"
)
title
=
'Object exported'
)
manage_importExportForm
=
DTMLFile
(
'dtml/importExport'
,
globals
())
manage_importExportForm
=
DTMLFile
(
'dtml/importExport'
,
globals
())
...
@@ -594,14 +595,12 @@ class ObjectManager(
...
@@ -594,14 +595,12 @@ class ObjectManager(
ob
=
self
.
_getOb
(
id
)
ob
=
self
.
_getOb
(
id
)
ob
.
manage_changeOwnershipType
(
explicit
=
0
)
ob
.
manage_changeOwnershipType
(
explicit
=
0
)
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
return
self
.
manage_main
(
self
,
REQUEST
,
manage_tabs_message
=
'<em>%s</em> sucessfully imported'
%
id
,
manage_tabs_message
=
'<em>%s</em> sucessfully imported'
%
id
,
title
=
'Object imported'
,
title
=
'Object imported'
,
update_menu
=
1
)
update_menu
=
1
)
# FTP support methods
# FTP support methods
...
...
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