Diff for /versionedFile/extVersionedFile.py between versions 1.1 and 1.4

version 1.1, 2006/10/04 07:35:27 version 1.4, 2007/02/05 15:32:50
Line 1 Line 1
   """actual version of the versioned file folder with external filestorage, 
   using the ExtFile Product, this version replaces externaVersionedFile.py
   DW 11.10.2006
   """
   
 from OFS.Folder import Folder  from OFS.Folder import Folder
 from OFS.Image import File  from OFS.Image import File
 from OFS.Image import cookId  from OFS.Image import cookId
Line 71  class generateDownloadZip: Line 76  class generateDownloadZip:
   
             savePath=os.path.join(tmpPath,lastV.title)              savePath=os.path.join(tmpPath,lastV.title)
             fh=file(savePath,"w")              fh=file(savePath,"w")
             fh.write(lastV.data)              fh.write(lastV.getData())
             fh.close()              fh.close()
   
         self.response+="<h3>2. step: creating the downloadable file</h3>"          self.response+="<h3>2. step: creating the downloadable file</h3>"
Line 861  class extVersionedFile(CatalogAware,Fold Line 866  class extVersionedFile(CatalogAware,Fold
     def diff(self,data):      def diff(self,data):
         """differenz between lastversion and data"""          """differenz between lastversion and data"""
         d=Differ()          d=Differ()
         tmp=self.getLastVersion().data          tmp=self.getLastVersion().getData()
         #print "XX",data,tmp          #print "XX",data,tmp
         try:          try:
          l=list(d.compare(data.splitlines(1),tmp.splitlines(1)))           l=list(d.compare(data.splitlines(1),tmp.splitlines(1)))
Line 880  class extVersionedFile(CatalogAware,Fold Line 885  class extVersionedFile(CatalogAware,Fold
     security.declarePublic('index_html')      security.declarePublic('index_html')
     def index_html(self):      def index_html(self):
         """main view"""          """main view"""
         lastVersion=self.getLastVersion()          #lastVersion=self.getLastVersion()
         #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())
           return self.history()
   
             
     security.declarePublic('getVersion')                                                    security.declarePublic('getVersion')                                              

Removed from v.1.1  
changed lines
  Added in v.1.4


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