Commit 8f5d4994 authored by Nicolas Delaby's avatar Nicolas Delaby

s/file_name/filename/

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41096 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 795a9f60
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -87,16 +84,16 @@ contribution_tool = context.getPortalObject().portal_contributions\n ...@@ -87,16 +84,16 @@ contribution_tool = context.getPortalObject().portal_contributions\n
# Ingest attachments\n # Ingest attachments\n
for attachment_item in context.getAttachmentInformationList():\n for attachment_item in context.getAttachmentInformationList():\n
# We do not care about files without name\n # We do not care about files without name\n
file_name = attachment_item.get(\'file_name\')\n filename = attachment_item.get(\'filename\')\n
# We do not take into account the message itself\n # We do not take into account the message itself\n
# XXX - this implementation is not acceptable in\n # XXX - this implementation is not acceptable in\n
# the long term. Better approach to defining the\n # the long term. Better approach to defining the\n
# body of a message is required\n # body of a message is required\n
if file_name and not file_name.startswith(\'part\'):\n if filename and not filename.startswith(\'part\'):\n
index = attachment_item[\'index\']\n index = attachment_item[\'index\']\n
data = context.getAttachmentData(index)\n data = context.getAttachmentData(index)\n
# XXX - too bad we are not using content_type here\n # XXX - too bad we are not using content_type here\n
d = contribution_tool.newContent(data=data, file_name=file_name, user_login=user_login, **metadata)\n d = contribution_tool.newContent(data=data, filename=filename, user_login=user_login, **metadata)\n
context.setAggregateList(context.getAggregateList() + [d.getRelativeUrl()])\n context.setAggregateList(context.getAggregateList() + [d.getRelativeUrl()])\n
\n \n
context.receive()\n context.receive()\n
...@@ -151,7 +148,7 @@ context.receive()\n ...@@ -151,7 +148,7 @@ context.receive()\n
<string>contribution_tool</string> <string>contribution_tool</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>attachment_item</string> <string>attachment_item</string>
<string>file_name</string> <string>filename</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>index</string> <string>index</string>
<string>data</string> <string>data</string>
......
1212 1217
\ 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