Commit 21a5406c authored by Andreas Jung's avatar Andreas Jung

unified handling of confirm messages for import/export objects

parent 37c5e8d7
...@@ -84,9 +84,9 @@ ...@@ -84,9 +84,9 @@
############################################################################## ##############################################################################
__doc__="""Object Manager __doc__="""Object Manager
$Id: ObjectManager.py,v 1.139 2001/07/05 13:19:02 andreas Exp $""" $Id: ObjectManager.py,v 1.140 2001/07/05 15:44:50 andreas Exp $"""
__version__='$Revision: 1.139 $'[11:-2] __version__='$Revision: 1.140 $'[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
......
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