[Erp5-report] r33514 nicolas.dumazet - in /erp5/trunk/bt5/erp5_crm: SkinTemplateItem/portal...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Mar 9 08:01:57 CET 2010


Author: nicolas.dumazet
Date: Tue Mar  9 08:01:57 2010
New Revision: 33514

URL: http://svn.erp5.org?rev=33514&view=rev
Log:
Fix TestCRMMailIngestion: use core rfc822 Python module instead of adhoc code

Modified:
    erp5/trunk/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_getEntityListFromFromHeader.xml
    erp5/trunk/bt5/erp5_crm/bt/revision

Modified: erp5/trunk/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_getEntityListFromFromHeader.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_getEntityListFromFromHeader.xml?rev=33514&r1=33513&r2=33514&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_getEntityListFromFromHeader.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_getEntityListFromFromHeader.xml [utf8] Tue Mar  9 08:01:57 2010
@@ -53,18 +53,12 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string encoding="cdata"><![CDATA[
-
-getResultValue = context.portal_catalog.getResultValue\n
+            <value> <string>getResultValue = context.portal_catalog.getResultValue\n
+\n
+from Products.ERP5Type.Utils import Email_parseAddressHeader\n
 \n
 result = []\n
-for recipient in text.split(\',\'):\n
-  if "<" in recipient:\n
-    recipient = recipient[recipient.find(\'<\') + 1:]\n
-    recipient = recipient[:recipient.find(\'>\')]\n
-  else:\n
-    # Remove extra spaces.\n
-    recipient = recipient.strip()\n
+for name, recipient in Email_parseAddressHeader(text):\n
   if recipient:\n
     email = getResultValue(url_string={\'query\':recipient, \'key\':\'ExactMatch\'}, portal_type=\'Email\', parent_portal_type=\'Person\')\n
     if email is None:\n
@@ -72,9 +66,7 @@
     if email is not None:\n
       result.append(email.getParentValue())\n
 return result\n
-
-
-]]></string> </value>
+</string> </value>
         </item>
         <item>
             <key> <string>_code</string> </key>
@@ -114,10 +106,12 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>getResultValue</string>
+                            <string>Products.ERP5Type.Utils</string>
+                            <string>Email_parseAddressHeader</string>
                             <string>result</string>
                             <string>_getiter_</string>
+                            <string>name</string>
                             <string>recipient</string>
-                            <string>_getitem_</string>
                             <string>email</string>
                             <string>None</string>
                           </tuple>

Modified: erp5/trunk/bt5/erp5_crm/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_crm/bt/revision?rev=33514&r1=33513&r2=33514&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_crm/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_crm/bt/revision [utf8] Tue Mar  9 08:01:57 2010
@@ -1,1 +1,1 @@
-458
+459




More information about the Erp5-report mailing list