[CMF-checkins] CVS: CMF/CMFSetup - tool.py:1.8
Tres Seaver
tseaver at zope.com
Mon May 24 13:48:39 EDT 2004
Update of /cvs-repository/CMF/CMFSetup
In directory cvs.zope.org:/tmp/cvs-serv30225
Modified Files:
tool.py
Log Message:
- Implement ZMI import methods.
=== CMF/CMFSetup/tool.py 1.7 => 1.8 ===
--- CMF/CMFSetup/tool.py:1.7 Mon May 24 10:36:48 2004
+++ CMF/CMFSetup/tool.py Mon May 24 13:48:38 2004
@@ -250,9 +250,34 @@
""" Import the steps selected by the user.
"""
if not ids:
- RESPONSE.redirect( '%s/manage_importSteps?manage_tabs_message=%s'
- % ( self.absolute_url(), 'No+steps+selected.' )
- )
+ message = 'No+steps+selected.'
+
+ else:
+ steps_run = []
+ for step_id in ids:
+ result = self.runImportStep( step_id
+ , run_dependencies
+ , purge_old
+ )
+ steps_run.extend( result[ 'steps' ] )
+
+ message = 'Steps+run:%s' % '+,'.join( steps_run )
+
+ RESPONSE.redirect( '%s/manage_importSteps?manage_tabs_message=%s'
+ % ( self.absolute_url(), message )
+ )
+
+ security.declareProtected( ManagePortal, 'manage_importSelectedSteps' )
+ def manage_importAllSteps( self, purge_old, RESPONSE ):
+
+ """ Import all steps.
+ """
+ result = self.runAllImportSteps( purge_old )
+ message = 'Steps+run:%s' % '+,'.join( result[ 'steps' ] )
+
+ RESPONSE.redirect( '%s/manage_importSteps?manage_tabs_message=%s'
+ % ( self.absolute_url(), message )
+ )
security.declareProtected( ManagePortal, 'manage_exportSteps' )
manage_exportSteps = PageTemplateFile( 'sutExportSteps', _wwwdir )
More information about the CMF-checkins
mailing list