--- cdli/cdli_files.py 2007/10/19 16:25:06 1.80.2.2 +++ cdli/cdli_files.py 2007/10/22 16:26:40 1.80.2.3 @@ -1812,31 +1812,31 @@ class CDLIFileFolder(extVersionedFileFol def getFile(self,fn): """get the content of the file fn""" - founds=self.CDLICatalog.search({'title':fn}) - if not founds: - return "" + if not self.hasObject(fn): + # search deeper + founds=self.CDLICatalog.search({'title':fn}) + if founds: + obj=founds[0].getObject().getContentObject() + else: + return "" else: - obj=founds[0].getObject().getContentObject() + obj = self[fn].getContentObject() - return obj.getData()[0:] + return obj.getData()[0:] + def checkCatalog(self,fn): """check if fn is in the catalog""" #TODO add checkCatalog - def findObjectsFromListWithVersion(self,list,author=None): """find objects from a list with versions @param list: list of tuples (cdliFile,version) """ - - - #self.REQUEST.SESSION['fileIds']=list#store fieldIds in session for further usage #self.REQUEST.SESSION['searchList']=self.REQUEST.SESSION['fileIds'] - pt=getattr(self,'filelistVersioned.html') return pt(search=list,author=author)