Diff for /OSAS/OSA_system/OSAS_add.py between versions 1.34 and 1.35

version 1.34, 2004/07/23 17:50:35 version 1.35, 2004/08/19 19:01:17
Line 188  def add6(self): Line 188  def add6(self):
   
     newtemplate=PageTemplateFile('Products/OSA_system/zpt/index_meta').__of__(self)      newtemplate=PageTemplateFile('Products/OSA_system/zpt/index_meta').__of__(self)
     newtemplate.content_type="text/plain"      newtemplate.content_type="text/plain"
     renderxml = newtemplate()      renderxml = newtemplate(encode='utf-8')
     if self.REQUEST.SESSION.has_key('no_upload'):      if self.REQUEST.SESSION.has_key('no_upload'):
         metapath=self.REQUEST.SESSION['path']+"/index.meta"          metapath=self.REQUEST.SESSION['path']+"/index.meta"
     else:      else:
         metapath=self.add_metadata['archive-path']+"/"+self.add_metadata['folder_name']+"/index.meta"          metapath=self.add_metadata['archive-path']+"/"+self.add_metadata['folder_name']+"/index.meta"
           
     f=open(metapath,'w')      f=open(metapath,'w')
     f.writelines(renderxml)      f.write(renderxml)
     f.close()      f.close()
     os.chmod(metapath,0664)      os.chmod(metapath,0664)
     os.popen('chmod -R 0775 %s'%self.add_metadata['archive-path']+"/"+self.add_metadata['folder_name'])       os.popen('chmod -R 0775 %s'%self.add_metadata['archive-path']+"/"+self.add_metadata['folder_name']) 
Line 258  def addPresentation(self,path): Line 258  def addPresentation(self,path):
         i+=1          i+=1
         self.REQUEST.SESSION['presentationname']="%02d-presentation"%i          self.REQUEST.SESSION['presentationname']="%02d-presentation"%i
     self.REQUEST.SESSION['path']=path      self.REQUEST.SESSION['path']=path
     self.REQUEST.SESSION['xmlvorschlag']="""<info>  
       tmpTxt="""<?xml version="1.0" encoding="UTF-8"?>
       <info>
     <author>%s</author>      <author>%s</author>
     <title>%s</title>      <title>%s</title>
     <date>%s</date>      <date>%s</date>
     <display>yes</display>      <display>yes</display>
 </info>"""%(author,title,date)  </info>"""%(author,title,date)
           
       self.REQUEST.SESSION['xmlvorschlag']=tmpTxt.encode('utf-8')
       
     newtemplate=PageTemplateFile('Products/OSA_system/zpt/addPresentation').__of__(self)      newtemplate=PageTemplateFile('Products/OSA_system/zpt/addPresentation').__of__(self)
     return newtemplate()      return newtemplate()
   
Line 410  def addTextExternal(self,path,texturl,ve Line 414  def addTextExternal(self,path,texturl,ve
     node.appendChild(subnode)      node.appendChild(subnode)
   
     writefile=file(path+"/index.meta","w")      writefile=file(path+"/index.meta","w")
     writefile.write(dom.toxml().encode('utf-8'))      writefile.write(dom.toxml(encoding="UTF-8"))
     writefile.close()      writefile.close()
   
     #change texttool tag      #change texttool tag
Line 439  def addTextExternal(self,path,texturl,ve Line 443  def addTextExternal(self,path,texturl,ve
   
     #index.meta ausgeben      #index.meta ausgeben
     writefile=file(path+"/index.meta","w")      writefile=file(path+"/index.meta","w")
     writefile.write(dom.toxml().encode('utf-8'))      writefile.write(dom.toxml(encoding="UTF-8"))
     writefile.close()      writefile.close()
           
     #registrieren      #registrieren
Line 512  def addDirsToIndexMeta(path,folder_name, Line 516  def addDirsToIndexMeta(path,folder_name,
     node.appendChild(subnode)      node.appendChild(subnode)
   
     writefile=file(path+"/index.meta","w")      writefile=file(path+"/index.meta","w")
     writefile.write(dom.toxml().encode('utf-8'))      writefile.write(dom.toxml(encoding='UTF-8'))
     writefile.close()      writefile.close()
   
 def readArchimedesXML(folder):  def readArchimedesXML(folder):
Line 671  def combineTextImage2(self,path): Line 675  def combineTextImage2(self,path):
             """nothing"""              """nothing"""
                           
     writefile=file(path+"/index.meta","w")      writefile=file(path+"/index.meta","w")
     writefile.write(dom.toxml().encode('utf-8'))      writefile.write(dom.toxml(encoding="UTF-8"))
     writefile.close()      writefile.close()
           
           

Removed from v.1.34  
changed lines
  Added in v.1.35


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