[Erp5-report] r41124 nicolas - /erp5/trunk/products/ERP5/Document/EmailDocument.py

nobody at svn.erp5.org nobody at svn.erp5.org
Sat Dec 4 16:01:32 CET 2010


Author: nicolas
Date: Sat Dec  4 16:01:32 2010
New Revision: 41124

URL: http://svn.erp5.org?rev=41124&view=rev
Log:
Restore Message-ID as source_reference, there is no need to
return Message-ID when asking for filename.
So filename and source_reference can co exists without collision.

Modified:
    erp5/trunk/products/ERP5/Document/EmailDocument.py

Modified: erp5/trunk/products/ERP5/Document/EmailDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/EmailDocument.py?rev=41124&r1=41123&r2=41124&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/EmailDocument.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/EmailDocument.py [utf8] Sat Dec  4 16:01:32 2010
@@ -340,16 +340,17 @@ class EmailDocument(TextDocument):
       return result
     return self.getFilename(*args)
 
-  security.declareProtected(Permissions.AccessContentsInformation, 'getFilename')
-  def getFilename(self, *args):
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'getSourceReference')
+  def getSourceReference(self, *args):
     """
       The Message-ID is considered here as the source reference
       of the message on the sender side (source)
     """
     if not self.hasData():
-      return self._baseGetFilename(*args)
+      return self._baseGetSourceReference(*args)
     if not len(args):
-      args = (self._baseGetFilename(),)
+      args = (self._baseGetSourceReference(),)
     content_information = self.getContentInformation()
     return content_information.get('Message-ID') or content_information.get('Message-Id', *args)
 



More information about the Erp5-report mailing list