Diff for /OSAS/OSA_system/OSAS_archiver.py between versions 1.7 and 1.8

version 1.7, 2004/01/07 10:46:30 version 1.8, 2004/01/07 15:29:01
Line 31  class OSAS_archiveInbox(SimpleItem,Persi Line 31  class OSAS_archiveInbox(SimpleItem,Persi
         self.title=title          self.title=title
         self.pathes=[]          self.pathes=[]
   
     def addPath(self,path):      def addPath(self,path,RESPONSE=None):
           """add a path"""
         today=time.localtime()          today=time.localtime()
         self.pathes.append([path,today])          self.pathes.append([path,today])
           if RESPONSE:
               RESPONSE.redirect("index_html")
   
     def index_html(self):      def index_html(self):
         """main"""          """main"""
Line 267  class OSAS_processViewer(SimpleItem,Pers Line 270  class OSAS_processViewer(SimpleItem,Pers
         return ret          return ret
             
     def writefile(self,path,txt,REQUEST):      def writefile(self,path,txt,REQUEST):
           """writefile"""
         f=open(path,'w')          f=open(path,'w')
         f.write(txt)          f.write(txt)
         f.close()          f.close()
Line 312  class OSAS_archiver(Folder, Persistent,I Line 316  class OSAS_archiver(Folder, Persistent,I
         {'label':'Main Config','action':'changeOSAS_archiverForm'},          {'label':'Main Config','action':'changeOSAS_archiverForm'},
         )          )
             
     # to be deleted later      def unarchive(self,path):
     #startPath="/mpiwg"          """unarchive the path"""
           f = os.popen("/usr/local/mpiwg/archive/unarchiver "+path,"r")
           return f.readlines()
   
       def checkIfUnarchive(self,path):
           if not os.path.exists(path+"/index.meta"):
               return 0
           f=file(path+"/index.meta","r").read()
           dom=xml.dom.minidom.parseString(f)
           archiveStorageDates=dom.getElementsByTagName("archive-storage-date")
           if archiveStorageDates:
               return 1
           else:
               return 0
   
     ## methoden aus dem alten archive.py      ## methoden aus dem alten archive.py
   
         
   
       
     def archiver(self,path):      def archiver(self,path):
         """archive the documents in path"""          """archive the documents in path"""
         tmp=archive.archive(path,self.REQUEST.SESSION)          tmp=archive.archive(path,self.REQUEST.SESSION)
         pt=PageTemplateFile('Products/OSA_system/archiveStatus.zpt').__of__(self)          pt=PageTemplateFile('Products/OSA_system/archiveStatus.zpt').__of__(self)
         return pt()          return pt()
   
               def archive2(self):
           pt=PageTemplateFile('Products/OSA_system/archive2.zpt').__of__(self)
           return pt()
   
   
     def metachecker(self,path):      def metachecker(self,path):
Line 467  class OSAS_archiver(Folder, Persistent,I Line 488  class OSAS_archiver(Folder, Persistent,I
         return ret          return ret
             
     def writefile(self,path,txt,REQUEST):      def writefile(self,path,txt,REQUEST):
           """writefile"""
         f=open(path,'w')          f=open(path,'w')
         f.write(txt)          f.write(txt)
         f.close()          f.close()
         rval=self.aq_acquire('archive2')          return self.archive2()
         return rval()  
   
     def error(self):      def error(self):
         """view errors"""          """view errors"""

Removed from v.1.7  
changed lines
  Added in v.1.8


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