--- ECHO_content/ECHO_collection.py 2006/02/14 17:28:52 1.262 +++ ECHO_content/ECHO_collection.py 2006/02/14 19:29:45 1.263 @@ -865,22 +865,15 @@ class ECHO_resource(CatalogAware,Folder, path=re.sub('/index.meta','',path) - path=re.sub(self.REQUEST['SERVER_URL'],'',path) - path=re.sub('http://'+self.REQUEST['HTTP_HOST'],'',path) - - path=re.sub('http://foxridge.mpiwg-berlin.mpg.de:8080','',path) # falls foxridge als server - path=re.sub('http://foxridge.mpiwg-berlin.mpg.de:8080','',path) # falls foxridge als server - path=re.sub('http://foxridge.mpiwg-berlin.mpg.de','',path) # falls foxridge als server - - path=re.sub('http://foxridge.rz-berlin.mpg.de:8080','',path) # falls foxridge als server - path=re.sub('http://foxridge.rz-berlin.mpg.de','',path) # falls foxridge als server - path=re.sub('http://content.mpiwg-berlin.mpg.de','',path) # falls content als server - path=re.sub('http://echo.mpiwg-berlin.mpg.de','',path) # falls echo - - path=re.sub('http://vision.rz-berlin.mpg.de','',path) # falls vision als server - - return ECHO_helpers.urlopen("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path).readlines() - + #TODO: direct access to the file system necessary, fix that also xmlrpc to the server where the index file is stored is possible + parsedUrl=urlparse.urlparse(path) + path=parsedUrl[2] + + try: + return ECHO_helpers.urlopen("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path).readlines() + except: + zLOG.LOG("ECHO_Resource (changeViewerTemplateSet)", zLOG.INFO,"%s (%s)"%sys.exc_info()[0:2]) + zLOG.LOG("ECHO_Resource (changeViewerTemplateSet)", zLOG.INFO,"http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path) if RESPONSE is not None: RESPONSE.redirect('manage_main')