[Erp5-report] r11781 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Dec 22 15:37:17 CET 2006


Author: bartek
Date: Fri Dec 22 15:37:15 2006
New Revision: 11781

URL: http://svn.erp5.org?rev=11781&view=rev
Log:
Send content_type if available (patch by Luke, Poland)

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_download.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_download.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_download.xml?rev=11781&r1=11780&r2=11781&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_download.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_download.xml Fri Dec 22 15:37:15 2006
@@ -69,7 +69,10 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>request=context.REQUEST\n
-request.RESPONSE.setHeader(\'Content-type\', context.getFormat())\n
+if hasattr(context,\'getContentType\'):\n
+  request.RESPONSE.setHeader(\'Content-type\', context.getContentType())\n
+else:\n
+  request.RESPONSE.setHeader(\'Content-type\', context.getFormat())\n
 request.RESPONSE.setHeader(\'Content-disposition\', \'attachment;; filename="%s"\' % context.title_or_id())\n
 return context.manage_FTPget()\n
 </string> </value>
@@ -117,6 +120,7 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>request</string>
+                            <string>hasattr</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=11781&r1=11780&r2=11781&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Fri Dec 22 15:37:15 2006
@@ -1,1 +1,1 @@
-224
+225




More information about the Erp5-report mailing list