[CMF-checkins] CVS: Products/CMFDefault/skins/control - folder_delete.py:1.2
Jens Vagelpohl
jens@zope.com
Tue, 11 Dec 2001 11:23:32 -0500
Update of /cvs-repository/Products/CMFDefault/skins/control
In directory cvs.zope.org:/tmp/cvs-serv929
Modified Files:
folder_delete.py
Log Message:
- prettified
- do not pass extra REQUEST to manage_delObjects
=== Products/CMFDefault/skins/control/folder_delete.py 1.1 => 1.2 ===
##parameters=
REQUEST=context.REQUEST
-if REQUEST.has_key('ids'):
- context.manage_delObjects(REQUEST['ids'], REQUEST)
- return REQUEST.RESPONSE.redirect(context.absolute_url() + '/folder_contents?portal_status_message=Deleted.')
+ret_url = context.absolute_url() + '/folder_contents'
+
+if REQUEST.has_key( 'ids' ):
+ context.manage_delObjects( REQUEST['ids'] )
+ qs = '?portal_status_message=Deleted.'
+
else:
- return REQUEST.RESPONSE.redirect(context.absolute_url() + '/folder_contents?portal_status_message=Please+select+one+or+more+items+first.')
+ qs = '?portal_status_message=Please+select+one+or+more+items+first.'
+
+
+return REQUEST.RESPONSE.redirect( ret_url + qs )