--- OSAS/OSA_system/OSAS_add.py 2004/08/19 19:01:17 1.35 +++ OSAS/OSA_system/OSAS_add.py 2004/10/04 12:57:03 1.36 @@ -137,6 +137,7 @@ def add3(self): def add4(self): + self.path=re.search(r"/mpiwg(.*)",self.REQUEST.SESSION['path']).group(1) self.folder_name=self.REQUEST['folder_name'] @@ -145,8 +146,10 @@ def add4(self): #return self.REQUEST['submit'] try: + #os.popen('mkdir '+self.REQUEST.SESSION['path']) os.mkdir(self.REQUEST.SESSION['path']) - os.chmod(self.REQUEST.SESSION['path'],0774) + os.chmod(self.REQUEST.SESSION['path'],0775) + except: """nothing""" @@ -156,6 +159,7 @@ def add4(self): self.image_folder_name="pageimg" newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_upload').__of__(self) + return newtemplate() elif self.REQUEST['submit']=="upload pdf": @@ -168,6 +172,7 @@ def add4(self): def add5(self): """ADD INDEX.META""" + os.chmod(self.REQUEST.SESSION['path'],0775) newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_add_metadata').__of__(self) return newtemplate() @@ -683,13 +688,15 @@ 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 - dlpath = re.sub('/mpiwg/online/','',self.REQUEST['path'])+"/"+self.REQUEST['image'] + path=re.sub('//','/',self.REQUEST['path']) # falls '//' im Pfad + dlpath = re.sub('/mpiwg/online/','',path)+"/"+self.REQUEST['image'] os.popen("ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat -src=/mpiwg/online -dest=/mpiwg/temp/online/scaled/thumb -dir=%s -scaleto=90 -replace >> /tmp/sc.out &"%dlpath ) #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") - f.write(patchedInfoXML(self.REQUEST['path'])) + tmp=patchedInfoXML(self.REQUEST['path']) + f.write(tmp.encode('utf-8')) f.close() splitted=path.split("/") fn=splitted[len(splitted)-1]