[CMF-checkins] CVS: CMF/CMFCollector/skins/collector - collector_issue_followup.py:1.7
Ken Manheimer
klm@zope.com
Thu, 15 Nov 2001 18:02:54 -0500
Update of /cvs-repository/CMF/CMFCollector/skins/collector
In directory cvs.zope.org:/tmp/cvs-serv15208
Modified Files:
collector_issue_followup.py
Log Message:
Implemented tolerance for sendmail delivery problems, without
completely hiding the problems.
Splash any followup error notice in the destination web page, using
portal_status_message.
=== CMF/CMFCollector/skins/collector/collector_issue_followup.py 1.6 => 1.7 ===
##title=Submit a new comment.
+from Products.PythonScripts.standard import url_quote_plus
+
REQUEST = context.REQUEST
-context.do_action(action,
- comment,
- assignees=REQUEST.get('assignees', []),
- file=REQUEST.get('file'),
- fileid=REQUEST.get('fileid', ''),
- filetype=(REQUEST.get('filetype', 'file')))
+got = context.do_action(action,
+ comment,
+ assignees=REQUEST.get('assignees', []),
+ file=REQUEST.get('file'),
+ fileid=REQUEST.get('fileid', ''),
+ filetype=(REQUEST.get('filetype', 'file')))
if context.status() in ['Resolved', 'Rejected', 'Deferred']:
destination = context.aq_parent.absolute_url()
else:
destination = context.absolute_url()
+
+if got:
+ destination += '?portal_status_message=' + url_quote_plus(got)
context.REQUEST.RESPONSE.redirect(destination)