Commit aabd4633 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Extend newContent API to support ZPublisher based calls for email ingestion...

Extend newContent API to support ZPublisher based calls for email ingestion (so that we no longer need ZMailIn or CMFMailIn).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15829 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 37a40707
......@@ -199,7 +199,7 @@ class ContributionTool(BaseTool):
def newContent(self, id=None, portal_type=None, url=None, container=None,
container_path=None,
discover_metadata=1, temp_object=0,
user_login=None, **kw):
user_login=None, data=None, file_name=None, **kw):
"""
The newContent method is overriden to implement smart content
creation by detecting the portal type based on whatever information
......@@ -223,6 +223,10 @@ class ContributionTool(BaseTool):
We always generate ID. So, we must prevent using the one
which we were provided.
"""
if file_name is not None: kw['file_name'] = file_name
if data is not None: kw['data'] = data # This is only used to make sure
# we can pass file as parameter to ZPublisher
# whenever we ingest email
# Temp objects use the standard newContent from Folder
if temp_object:
# For temp_object creation, use the standard method
......
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