[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog - CatalogBrains.py:1.8

Casey Duncan casey@zope.com
Mon, 30 Sep 2002 14:05:41 -0400


Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv7129/lib/python/Products/ZCatalog

Modified Files:
	CatalogBrains.py 
Log Message:
Add optional "relative" argument to getURL so that it can return site relative u
rls like absolute_url can


=== Zope/lib/python/Products/ZCatalog/CatalogBrains.py 1.7 => 1.8 ===
--- Zope/lib/python/Products/ZCatalog/CatalogBrains.py:1.7	Wed Aug 14 18:25:15 2002
+++ Zope/lib/python/Products/ZCatalog/CatalogBrains.py	Mon Sep 30 14:05:40 2002
@@ -29,10 +29,10 @@
         """Get the physical path for this record"""
         return self.aq_parent.getpath(self.data_record_id_)
 
-    def getURL(self):
+    def getURL(self, relative=0):
         """Try to generate a URL for this record"""
         try:
-            return self.REQUEST.physicalPathToURL(self.getPath())
+            return self.REQUEST.physicalPathToURL(self.getPath(), relative)
         except:
             return self.getPath()