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):
if self.client is None:
return ''
if zope29: # evil hack to get rid of acquisition stuff
parts = absoluteURL(self.client.manager, request).split('/')
url = '/'.join(parts[:-3])
if zope29:
path = self.client.manager.getPhysicalPath()
url = request.physicalPathToURL(path)
else:
url = absoluteURL(self.client.manager, request)
return '%s?id=%s' % (url, self.client.__name__)