[Erp5-report] r10445 - /erp5/trunk/products/ERP5OOo/Document/DMSFile.py

nobody at svn.erp5.org nobody at svn.erp5.org
Sun Oct 1 21:26:23 CEST 2006


Author: bartek
Date: Sun Oct  1 21:26:20 2006
New Revision: 10445

URL: http://svn.erp5.org?rev=10445&view=rev
Log:
cleanup and comments

Modified:
    erp5/trunk/products/ERP5OOo/Document/DMSFile.py

Modified: erp5/trunk/products/ERP5OOo/Document/DMSFile.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/Document/DMSFile.py?rev=10445&r1=10444&r2=10445&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/Document/DMSFile.py (original)
+++ erp5/trunk/products/ERP5OOo/Document/DMSFile.py Sun Oct  1 21:26:20 2006
@@ -242,6 +242,7 @@
     getWikiSuccessorValueList - the way to find objects is on 
     implementation level
     '''
+    # XXX results should be cached as volatile attributes
     lst=[]
     for ref in self.getWikiSuccessorReferenceList():
       r=ref[1]
@@ -249,16 +250,6 @@
       if len(res)>0:
         lst.append(res[0].getObject())
     return lst
-    #def cached_getWikiSuccessorValueList():
-      #lst=[]
-      #for ref in self.getWikiSuccessorReferenceList():
-        #res=self.DMS_findDocument(ref)
-        #if len(res)>0:
-          #lst.append(res[0].getObject())
-      #return lst
-    #cached_getWikiSuccessorValueList = CachingMethod(cached_getWikiSuccessorValueList,
-        #id='DMSFile_getWikiSuccessorValueList')
-    #return cached_getWikiSuccessorValueList()
 
   security.declareProtected(Permissions.View, 'getWikiPredecessorValueList')
   def getWikiPredecessorValueList(self):
@@ -267,20 +258,12 @@
     document, and on how a doc must reference me to be my predecessor (reference only,
     or with a language, etc
     '''
+    # XXX results should be cached as volatile attributes
     lst=self.DMS_findPredecessors()
     lst=[r.getObject() for r in lst]
     di=dict.fromkeys(lst) # make it unique
     ref=self.getReference()
     return [o for o in di.keys() if o.getReference()!=ref] # every object has its own reference in SearchableText
-    #def cached_getWikiPredecessorValueList():
-      #lst=self.DMS_findPredecessors()
-      #lst=[r.getObject() for r in lst]
-      #di=dict.fromkeys(lst) # make it unique
-      #ref=self.getReference()
-      #return [o for o in di.keys() if o.getReference()!=ref] # every object has its own reference in SearchableText
-    #cached_getWikiPredecessorValueList=CachingMethod(cached_getWikiPredecessorValueList,
-        #id='DMSFile_getWikiPredecessorValueList')
-    #return cached_getWikiPredecessorValueList()
 
   # BG copied from File in case
   index_html = CMFFile.index_html




More information about the Erp5-report mailing list