[Erp5-report] r8708 - /erp5/trunk/products/ZSQLCatalog/zsqlbrain.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Sun Jul 23 23:26:43 CEST 2006
Author: jp
Date: Sun Jul 23 23:26:40 2006
New Revision: 8708
URL: http://svn.erp5.org?rev=8708&view=rev
Log:
Implementation of absolute_url is now consistent with Zope standard implementation.
Modified:
erp5/trunk/products/ZSQLCatalog/zsqlbrain.py
Modified: erp5/trunk/products/ZSQLCatalog/zsqlbrain.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/zsqlbrain.py?rev=8708&r1=8707&r2=8708&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/zsqlbrain.py (original)
+++ erp5/trunk/products/ZSQLCatalog/zsqlbrain.py Sun Jul 23 23:26:40 2006
@@ -69,11 +69,21 @@
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):
"""
More information about the Erp5-report
mailing list