From fe259f8dd61b621fd095bd44a885c62d1e96d8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20G=C3=B3rny?= <bartek@gorny.edu.pl> Date: Sun, 1 Oct 2006 19:26:20 +0000 Subject: [PATCH] cleanup and comments git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10445 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5OOo/Document/DMSFile.py | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/product/ERP5OOo/Document/DMSFile.py b/product/ERP5OOo/Document/DMSFile.py index 5e1249c9c6..45493e557e 100644 --- a/product/ERP5OOo/Document/DMSFile.py +++ b/product/ERP5OOo/Document/DMSFile.py @@ -242,6 +242,7 @@ class DMSFile(XMLObject,File): 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 @@ class DMSFile(XMLObject,File): 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 @@ class DMSFile(XMLObject,File): 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 -- 2.30.9