From d15879cb124e6c2da196f19eb806536ee2841d71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 28 May 2010 14:59:31 +0000
Subject: [PATCH] headers will be set by index_html

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35740 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_core/Base_download.xml      | 15 +--------------
 product/ERP5/bootstrap/erp5_core/bt/revision      |  2 +-
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_download.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_download.xml
index 65384def7f..d488ab603f 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_download.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_download.xml
@@ -58,21 +58,11 @@ response = request.RESPONSE\n
 \n
 from zExceptions import Unauthorized\n
 \n
-if hasattr(context,\'getContentType\'):\n
-  response.setHeader(\'Content-type\', context.getContentType())\n
-else:\n
-  response.setHeader(\'Content-type\', context.getFormat())\n
-\n
-file_name = context.getSourceReference() or context.getTitle() or context.getId()\n
-response.setHeader(\'Content-disposition\', \'attachment; filename="%s"\' % file_name)\n
-\n
 try:\n
-  result = context.index_html(request, response)\n
+  return context.index_html(request, response)\n
 except Unauthorized:\n
   msg = context.Base_translateString("You do not have enough permission for converting this document.")\n
   return context.Base_redirect(keep_items=dict(portal_status_message=msg))\n
-\n
-return result\n
 </string> </value>
         </item>
         <item>
@@ -115,10 +105,7 @@ return result\n
                             <string>response</string>
                             <string>zExceptions</string>
                             <string>Unauthorized</string>
-                            <string>hasattr</string>
                             <string>context</string>
-                            <string>file_name</string>
-                            <string>result</string>
                             <string>msg</string>
                             <string>dict</string>
                           </tuple>
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index f07ae304b1..30ab5448a9 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-1592
\ No newline at end of file
+1593
\ No newline at end of file
-- 
2.30.9