[Erp5-report] r13539 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Mar 21 15:12:54 CET 2007
Author: bartek
Date: Wed Mar 21 15:12:51 2007
New Revision: 13539
URL: http://svn.erp5.org?rev=13539&view=rev
Log:
When downloading, if object has no title, send source_reference as file name (instead of it which is usually a meaningless number).
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=13539&r1=13538&r2=13539&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 Wed Mar 21 15:12:51 2007
@@ -73,7 +73,8 @@
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
+file_name = context.getTitle() or context.getSourceReference()\n
+request.RESPONSE.setHeader(\'Content-disposition\', \'attachment;; filename="%s"\' % file_name)\n
return context.manage_FTPget()\n
</string> </value>
</item>
@@ -121,6 +122,7 @@
<string>context</string>
<string>request</string>
<string>hasattr</string>
+ <string>file_name</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=13539&r1=13538&r2=13539&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Wed Mar 21 15:12:51 2007
@@ -1,1 +1,1 @@
-278
+279
More information about the Erp5-report
mailing list