fix for Zope2 compatibility

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2202 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2007-11-27 18:36:54 +00:00
parent aa4ce1bbf5
commit 8d931d9786

View file

@ -61,9 +61,9 @@ class MessageInstance(Instance):
def getClientUrl(self, request): def getClientUrl(self, request):
if self.client is None: if self.client is None:
return '' return ''
if zope29: # evil hack to get rid of acquisition stuff if zope29:
parts = absoluteURL(self.client.manager, request).split('/') path = self.client.manager.getPhysicalPath()
url = '/'.join(parts[:-3]) url = request.physicalPathToURL(path)
else: else:
url = absoluteURL(self.client.manager, request) url = absoluteURL(self.client.manager, request)
return '%s?id=%s' % (url, self.client.__name__) return '%s?id=%s' % (url, self.client.__name__)