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

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Sep 7 19:27:25 CEST 2007


Author: jerome
Date: Fri Sep  7 19:27:25 2007
New Revision: 16167

URL: http://svn.erp5.org?rev=16167&view=rev
Log:
Fix Base_download so that it can be used by non manager users

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=16167&r1=16166&r2=16167&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 Sep  7 19:27:25 2007
@@ -68,14 +68,17 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>request=context.REQUEST\n
+            <value> <string>request = container.REQUEST\n
+response = request.RESPONSE\n
+\n
 if hasattr(context,\'getContentType\'):\n
-  request.RESPONSE.setHeader(\'Content-type\', context.getContentType())\n
+  response.setHeader(\'Content-type\', context.getContentType())\n
 else:\n
-  request.RESPONSE.setHeader(\'Content-type\', context.getFormat())\n
-file_name = context.getTitle() or context.getSourceReference()\n
-request.RESPONSE.setHeader(\'Content-disposition\', \'attachment;; filename="%s"\' % file_name)\n
-return context.manage_FTPget()\n
+  response.RESPONSE.setHeader(\'Content-type\', context.getFormat())\n
+\n
+file_name = context.getTitle() or context.getSourceReference() or context.getId()\n
+response.setHeader(\'Content-disposition\', \'attachment;; filename="%s"\' % file_name)\n
+return context.index_html(request, response)\n
 </string> </value>
         </item>
         <item>
@@ -119,9 +122,11 @@
                         <value>
                           <tuple>
                             <string>_getattr_</string>
+                            <string>container</string>
+                            <string>request</string>
+                            <string>response</string>
+                            <string>hasattr</string>
                             <string>context</string>
-                            <string>request</string>
-                            <string>hasattr</string>
                             <string>file_name</string>
                           </tuple>
                         </value>

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=16167&r1=16166&r2=16167&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Fri Sep  7 19:27:25 2007
@@ -1,1 +1,1 @@
-448
+449




More information about the Erp5-report mailing list