[Erp5-report] r22520 - in /erp5/trunk/bt5/erp5_crm: SkinTemplateItem/portal_skins/erp5_crm/...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jul 17 14:44:56 CEST 2008
Author: nicolas
Date: Thu Jul 17 14:44:55 2008
New Revision: 22520
URL: http://svn.erp5.org?rev=22520&view=rev
Log:
2008-07-17 nicolas
Get Forwarded data from attachments if required
Modified:
erp5/trunk/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_finishIngestion.xml
erp5/trunk/bt5/erp5_crm/bt/change_log
erp5/trunk/bt5/erp5_crm/bt/revision
Modified: erp5/trunk/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_finishIngestion.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_finishIngestion.xml?rev=22520&r1=22519&r2=22520&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_finishIngestion.xml (original)
+++ erp5/trunk/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_finishIngestion.xml Thu Jul 17 14:44:55 2008
@@ -83,6 +83,7 @@
if subject.startswith(mark+\':\'):\n
forwarded_mail = True\n
break\n
+\n
if forwarded_mail is True:\n
# find original recipient\n
source = context.getSource()\n
@@ -95,14 +96,22 @@
from_header_length = len(from_header)\n
Base_getEntityListFromFromHeader = context.Base_getEntityListFromFromHeader\n
line = \'\'\n
+ entity_list = []\n
for line in body.split(\'\\n\'):\n
if line.startswith(from_header):\n
break\n
if line:\n
from_text = line[from_header_length:]\n
- entity_list = Base_getEntityListFromFromHeader(from_text)\n
- if entity_list:\n
- context.setSource(entity_list[0].getRelativeUrl())\n
+ entity_list.extend(Base_getEntityListFromFromHeader(from_text))\n
+ if not entity_list:\n
+ #Get data from attachments\n
+ for attachment in context.getAttachmentInformationList():\n
+ if \'From\' in attachment:\n
+ entity_list.extend(Base_getEntityListFromFromHeader(attachment[\'From\']))\n
+ break\n
+ if entity_list:\n
+ source = entity_list[0].getRelativeUrl()\n
+ context.setSource(source)\n
</string> </value>
</item>
<item>
@@ -169,8 +178,9 @@
<string>from_header_length</string>
<string>Base_getEntityListFromFromHeader</string>
<string>line</string>
+ <string>entity_list</string>
<string>from_text</string>
- <string>entity_list</string>
+ <string>attachment</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_crm/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_crm/bt/change_log?rev=22520&r1=22519&r2=22520&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_crm/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_crm/bt/change_log Thu Jul 17 14:44:55 2008
@@ -1,3 +1,6 @@
+2008-07-17 nicolas
+Get Forwarded data from attachments if required
+
2008-07-17 nicolas
Quote url_string parameter
Modified: erp5/trunk/bt5/erp5_crm/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_crm/bt/revision?rev=22520&r1=22519&r2=22520&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_crm/bt/revision (original)
+++ erp5/trunk/bt5/erp5_crm/bt/revision Thu Jul 17 14:44:55 2008
@@ -1,1 +1,1 @@
-288
+292
More information about the Erp5-report
mailing list