Commit 13d9ba4b authored by Jérome Perrin's avatar Jérome Perrin

cleanups

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31190 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eac64269
...@@ -76,7 +76,7 @@ if report_section.getFormId():\n ...@@ -76,7 +76,7 @@ if report_section.getFormId():\n
form = getattr(context, report_section.getFormId())\n form = getattr(context, report_section.getFormId())\n
else:\n else:\n
form = None\n form = None\n
#context.log(request.text())\n \n
selection_name = request.get(\'prefixed_selection_name\')\n selection_name = request.get(\'prefixed_selection_name\')\n
data = context.render_report_section.pt_render(\n data = context.render_report_section.pt_render(\n
extra_context=dict(form=form,\n extra_context=dict(form=form,\n
......
...@@ -78,15 +78,15 @@ report_data = context.restrictedTraverse(form_path).report_view.pt_render(\n ...@@ -78,15 +78,15 @@ report_data = context.restrictedTraverse(form_path).report_view.pt_render(\n
report_method=dummyReportMethod,\n report_method=dummyReportMethod,\n
form=portal.restrictedTraverse(form_path)))\n form=portal.restrictedTraverse(form_path)))\n
\n \n
attachment_name = [x[len(\'filename=\'):] for x in request.RESPONSE.getHeader(\n attachment_name = [x[len(\'filename=\'):] for x in (request.RESPONSE.getHeader(\n
\'content-disposition\').split(\';\')\n \'content-disposition\') or \'\').split(\';\')\n
if x.startswith(\'filename=\')][0]\n if x.startswith(\'filename=\')][0]\n
if attachment_name.startswith(\'"\'):\n if attachment_name.startswith(\'"\'):\n
attachment_name = attachment_name[1:]\n attachment_name = attachment_name[1:]\n
if attachment_name.endswith(\'"\'):\n if attachment_name.endswith(\'"\'):\n
attachment_name = attachment_name[:-1]\n attachment_name = attachment_name[:-1]\n
attachment_list = (\n attachment_list = (\n
{\'mime_type\': request.RESPONSE.getHeader(\'content-type\').split(\';\')[0],\n {\'mime_type\': (request.RESPONSE.getHeader(\'content-type\') or \'application/octet-stream;\').split(\';\')[0],\n
\'content\': \'%s\' % report_data,\n \'content\': \'%s\' % report_data,\n
\'name\': attachment_name},)\n \'name\': attachment_name},)\n
\n \n
......
74 75
\ No newline at end of file \ No newline at end of file
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