Diff for /versionedFile/extVersionedFile.py between versions 1.19 and 1.25

version 1.19, 2008/01/21 17:36:45 version 1.25, 2008/08/08 16:19:26
Line 613  class extVersionedFileObject(ExtFile): Line 613  class extVersionedFileObject(ExtFile):
         self.time = time          self.time = time
         self.author = author          self.author = author
   
       security.declareProtected('manage','changeObject')
       def changeObject(self,**args):
           """modify any of the objects attributes"""
           for arg in args:
               if hasattr(self, arg):
                   logging.debug("changeObject %s: %s=%s"%(repr(self),arg,args[arg]))
                   setattr(self, arg, args[arg])
   
     security.declarePublic('getTitle')      security.declarePublic('getTitle')
     def getTitle(self):      def getTitle(self):
Line 790  class extVersionedFile(CatalogAware,Fold Line 797  class extVersionedFile(CatalogAware,Fold
         self.id=id          self.id=id
         self.title=title          self.title=title
         self.lockedBy=lockedBy          self.lockedBy=lockedBy
           if self.lockedBy is None:
               self.lockedBy = ''
         self.author=author          self.author=author
         self.lastVersionNumber=0          self.lastVersionNumber=0
         self.lastVersionId=None          self.lastVersionId=None
Line 889  class extVersionedFile(CatalogAware,Fold Line 898  class extVersionedFile(CatalogAware,Fold
           
     def getLockedBy(self):      def getLockedBy(self):
         """get locked by"""          """get locked by"""
           if self.lockedBy is None:
               self.lockedBy = ''
         return str(self.lockedBy)          return str(self.lockedBy)
           
     def getLastVersionNumber(self):      def getLastVersionNumber(self):
Line 1018  class extVersionedFile(CatalogAware,Fold Line 1029  class extVersionedFile(CatalogAware,Fold
         ret.sort(sortv)          ret.sort(sortv)
         return ret          return ret
   
       def getVersionList(self):
           """get a list of dicts with author, comment, filename, etc, of all versions"""
           vl = []
           for v in self.objectValues(self.content_meta_type):
               vl.append({'versionNumber':getattr(v,'versionNumber',0),
                         'title':v.getTitle(),
                         'id':v.getId(),
                         'date':v.getTime(),
                         'author':getattr(v,'author',''),
                         'comment':getattr(v,'versionComment','')
                         })
           return vl
   
     security.declareProtected('AUTHENTICATED_USER','forceunlock')         security.declareProtected('AUTHENTICATED_USER','forceunlock')   
     def forceunlock(self,RESPONSE=None):      def forceunlock(self,RESPONSE=None):
         """unlock"""          """unlock"""

Removed from v.1.19  
changed lines
  Added in v.1.25


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