version 1.169, 2004/09/01 19:11:36
|
version 1.170, 2004/09/27 19:55:08
|
Line 3675 class ECHO_root(Folder,Persistent,Implic
|
Line 3675 class ECHO_root(Folder,Persistent,Implic
|
|
|
def getMetaDatasXML(self,viewerType=None,filter=None): |
def getMetaDatasXML(self,viewerType=None,filter=None): |
"""gebe all ressourcen aus""" |
"""gebe all ressourcen aus""" |
|
# check if the request's host part was OK |
|
http_host = self.REQUEST['HTTP_HOST'] |
|
host_port = self.REQUEST['SERVER_PORT'] |
|
fix_host = None |
|
if http_host and http_host.rfind(host_port) == -1: |
|
print "HTTP_HOST needs fixing!" |
|
fix_host = http_host + ":" + host_port |
|
|
ret="""<?xml version="1.0" ?> |
ret="""<?xml version="1.0" ?> |
<index>""" |
<index>""" |
for resource in self.ZopeFind(self,obj_metatypes=['ECHO_resource'],search_sub=1): |
for resource in self.ZopeFind(self,obj_metatypes=['ECHO_resource'],search_sub=1): |
|
|
echo_url=resource[1].absolute_url() |
echo_url=resource[1].absolute_url() |
|
if fix_host: |
|
#print "replacing ", http_host, " by ", fix_host |
|
echo_url = string.replace(echo_url, http_host, fix_host, 1) |
|
|
if hasattr(resource[1],'link'): |
if hasattr(resource[1],'link'): |
meta_url=echo_url+"/getMetaDataXML" |
meta_url=echo_url+"/getMetaDataXML" |
Line 3698 class ECHO_root(Folder,Persistent,Implic
|
Line 3709 class ECHO_root(Folder,Persistent,Implic
|
|
|
ret +="""\n</index>""" |
ret +="""\n</index>""" |
|
|
|
|
self.REQUEST.RESPONSE.setHeader("Content-Type", "text/xml") |
self.REQUEST.RESPONSE.setHeader("Content-Type", "text/xml") |
self.REQUEST.RESPONSE.write(ret) |
self.REQUEST.RESPONSE.write(ret) |
|
|