Diff for /versionedFile/versionedFile.py between versions 1.54 and 1.56

version 1.54, 2005/11/28 12:31:28 version 1.56, 2006/02/17 12:16:08
Line 518  class versionedFileObject(File): Line 518  class versionedFileObject(File):
     manage_editForm._setName('manage_editForm')      manage_editForm._setName('manage_editForm')
   
   
     security.declarePublic('getVComment')      security.declarePublic('getTitle')
   
       def getTitle(self):
           """get title"""
           return self.title
   
       security.declarePublic('getVComment')
     def getVComment(self):      def getVComment(self):
         """get the comment of this file"""          """get the comment of this file"""
         if not hasattr(self,'vComment') or (not self.vComment) or (self.vComment.lstrip()==""):          if not hasattr(self,'vComment') or (not self.vComment) or (self.vComment.lstrip()==""):
Line 633  class versionedFileObject(File): Line 638  class versionedFileObject(File):
     def lastEditor(self):      def lastEditor(self):
         """last Editor"""          """last Editor"""
         if hasattr(self,'author'):          if hasattr(self,'author'):
               try:
             ret=self.author.replace("-","\n")              ret=self.author.replace("-","\n")
               except:#old version of versionded file sometimes stored the user object and not only the name the following corrects this
                   ret=str(self.author).replace("-","\n")
             ret=ret.replace("\r","\n")              ret=ret.replace("\r","\n")
             return ret              return ret
   
Line 690  class versionedFile(CatalogAware,Folder) Line 698  class versionedFile(CatalogAware,Folder)
   
     default_catalog='fileCatalog'      default_catalog='fileCatalog'
           
       def getTitle(self):
           """get title"""
           return self.title
       
     def PrincipiaSearchSource(self):      def PrincipiaSearchSource(self):
            """Return cataloguable key for ourselves."""             """Return cataloguable key for ourselves."""
            return str(self)             return str(self)
Line 823  class versionedFile(CatalogAware,Folder) Line 835  class versionedFile(CatalogAware,Folder)
         #return "File:"+self.title+"  Version:%i"%lastVersion.versionNumber," modified:",lastVersion.bobobase_modification_time()," size:",lastVersion.getSize(),"modified by:",lastVersion.lastEditor()          #return "File:"+self.title+"  Version:%i"%lastVersion.versionNumber," modified:",lastVersion.bobobase_modification_time()," size:",lastVersion.getSize(),"modified by:",lastVersion.lastEditor()
         return "File: %s Version:%i modified:%s size:%s modified by:%s"%(self.title,lastVersion.versionNumber,lastVersion.getTime(),lastVersion.getSize(),lastVersion.lastEditor())          return "File: %s Version:%i modified:%s size:%s modified by:%s"%(self.title,lastVersion.versionNumber,lastVersion.getTime(),lastVersion.getSize(),lastVersion.lastEditor())
     security= ClassSecurityInfo()                                 security= ClassSecurityInfo()                           
   
        
     security.declarePublic('getVersion')                                                    security.declarePublic('getVersion')                                              
     def getVersion(self):      def getVersion(self):
         tmp=0          tmp=0

Removed from v.1.54  
changed lines
  Added in v.1.56


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>