Commit 83c71a8a authored by Jean-Paul Smets's avatar Jean-Paul Smets

Implementation of absolute_url is now consistent with Zope standard implementation.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8708 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a3b8deaa
...@@ -69,11 +69,21 @@ class ZSQLBrain(Acquisition.Implicit): ...@@ -69,11 +69,21 @@ class ZSQLBrain(Acquisition.Implicit):
error=sys.exc_info() ) error=sys.exc_info() )
return None return None
def absolute_url(self): def absolute_url(self, relative=0):
""" """
returns the path stored in the Catalog Default method used to return the path stored in the Catalog.
However, if virtual hosting is implemented, we must return
a value which is compatible with the standard absolute_url
behaviour
And if absolute_url is invoked within a Web Site,
additional Web Site behaviour is required
Implementation of absolute_url therefore consists in using
physicalPathToURL defined in the REQUEST so that absolute_url
is consistent with HTTPRequest implementation.
""" """
return self.path return self.REQUEST.physicalPathToURL(self.path, relative=relative)
def resolve_url(self, path, REQUEST): def resolve_url(self, path, REQUEST):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment