[Erp5-report] r15829 - /erp5/trunk/products/ERP5/Tool/ContributionTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Aug 27 14:51:31 CEST 2007


Author: jp
Date: Mon Aug 27 14:51:31 2007
New Revision: 15829

URL: http://svn.erp5.org?rev=15829&view=rev
Log:
Extend newContent API to support ZPublisher based calls for email ingestion (so that we no longer need ZMailIn or CMFMailIn).

Modified:
    erp5/trunk/products/ERP5/Tool/ContributionTool.py

Modified: erp5/trunk/products/ERP5/Tool/ContributionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/ContributionTool.py?rev=15829&r1=15828&r2=15829&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/ContributionTool.py (original)
+++ erp5/trunk/products/ERP5/Tool/ContributionTool.py Mon Aug 27 14:51:31 2007
@@ -199,7 +199,7 @@
   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 @@
         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




More information about the Erp5-report mailing list