From 83c71a8a1858470d782ef429adcd29a912635546 Mon Sep 17 00:00:00 2001 From: Jean-Paul Smets <jp@nexedi.com> Date: Sun, 23 Jul 2006 21:26:40 +0000 Subject: [PATCH] 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 --- product/ZSQLCatalog/zsqlbrain.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/product/ZSQLCatalog/zsqlbrain.py b/product/ZSQLCatalog/zsqlbrain.py index 9569e2fc96..49f8a330cf 100644 --- a/product/ZSQLCatalog/zsqlbrain.py +++ b/product/ZSQLCatalog/zsqlbrain.py @@ -69,11 +69,21 @@ class ZSQLBrain(Acquisition.Implicit): error=sys.exc_info() ) 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): """ -- 2.30.9