[Zope-Checkins] CVS: Zope2 - ObjectManager.py:1.140
andreas@serenade.digicool.com
andreas@serenade.digicool.com
Thu, 5 Jul 2001 11:44:51 -0400
Update of /cvs-repository/Zope2/lib/python/OFS
In directory serenade:/tmp/cvs-serv28064/lib/python/OFS
Modified Files:
ObjectManager.py
Log Message:
unified handling of confirm messages for import/export objects
--- Updated File ObjectManager.py in package Zope2 --
--- ObjectManager.py 2001/07/05 13:19:02 1.139
+++ ObjectManager.py 2001/07/05 15:44:50 1.140
@@ -521,7 +521,7 @@
return r
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."""
if not id:
# can't use getId() here (breaks on "old" exported objects)
@@ -547,13 +547,14 @@
XMLExportImport.exportXML(ob._p_jar, ob._p_oid, f)
else:
ob._p_jar.exportFile(ob._p_oid, f)
- if RESPONSE is not None:
- return MessageDialog(
- title="Object exported",
- message="<EM>%s</EM> sucessfully\
- exported to <pre>%s</pre>." % (id, f),
- action="manage_main")
+ if REQUEST is not None:
+ return self.manage_main(self, REQUEST,
+ manage_tabs_message=
+ '<em>%s</em> sucessfully exported to <em>%s</em>' % (id,f),
+ title = 'Object exported')
+
+
manage_importExportForm=DTMLFile('dtml/importExport',globals())
def manage_importObject(self, file, REQUEST=None, set_owner=1):
@@ -594,14 +595,12 @@
ob=self._getOb(id)
ob.manage_changeOwnershipType(explicit=0)
-
if REQUEST is not None:
return self.manage_main(self, REQUEST,
manage_tabs_message='<em>%s</em> sucessfully imported' % id,
title = 'Object imported',
update_menu=1)
-
# FTP support methods