--- OSAS/OSA_system/OSAS_add.py 2004/04/16 09:11:34 1.28 +++ OSAS/OSA_system/OSAS_add.py 2004/06/23 05:36:08 1.31 @@ -144,6 +144,14 @@ def add4(self): self.REQUEST.SESSION['folder_name']=self.folder_name if self.REQUEST['submit']=="upload images": self.REQUEST.SESSION['path']=os.path.join(self.REQUEST.SESSION['path'],self.REQUEST['folder_name']) + + + try: + os.mkdir(self.REQUEST.SESSION['path']) + os.chmod(self.REQUEST.SESSION['path'],0774) + except: + """nothing""" + self.image_folder_name="pageimg" newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_upload').__of__(self) return newtemplate() @@ -192,15 +200,16 @@ def add6(self): else: #print self.add_metadata['archive-path'] self.viewpath=re.search(r"/mpiwg/online/(.*)",self.add_metadata['archive-path']).group(1) - if not (self.REQUEST.SESSION['no_upload']=="text"): + + if (self.REQUEST.SESSION.has_key('no_upload')) and (self.REQUEST.SESSION['no_upload']=="text"): + """text upload""" + return 1 + else: newtemplate2=PageTemplateFile('Products/OSA_system/zpt/OSAS_saved').__of__(self) newtemplate2.content_type="text/html" self.REQUEST.response.setHeader('Content-Type','text/html') return newtemplate2() - else: - """text upload""" - return 1 - + def date(self): @@ -578,6 +587,13 @@ def combineTextImage2(self,path): xsltnodetext=dom.createTextNode(self.REQUEST['project']) xsltnode.appendChild(xsltnodetext) subnode.appendChild(xsltnode) + + if self.REQUEST.has_key('digiliburlprefix'): + if not self.REQUEST['digiliburlprefix']=="": + xsltnode=dom.createElement('digiliburlprefix') + xsltnodetext=dom.createTextNode(self.REQUEST['digiliburlprefix']) + xsltnode.appendChild(xsltnodetext) + subnode.appendChild(xsltnode) node.appendChild(subnode) @@ -622,7 +638,7 @@ def combineTextImage2(self,path): urllib.urlopen("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path).readlines() if self.REQUEST.has_key('image'): # falls bilder - os.popen("ssh nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat.pl %s /mpiwg/temp/online/scaled/thumb 90 >> /tmp/sc.out &"% re.sub('/mpiwg/online/','',self.REQUEST['path']+"/"+self.REQUEST['image'])) + os.popen("ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat.pl %s /mpiwg/temp/online/scaled/thumb 90 >> /tmp/sc.out &"% re.sub('/mpiwg/online/','',self.REQUEST['path']+"/"+self.REQUEST['image'])) else: # falls keine Bilder (bug in reg.cgi info file ersetzen) f=file("/tmp/tmp_info.xml","w")