[CMF-checkins] CVS: CMF - DiscussionItem.py:1.7
tseaver@digicool.com
tseaver@digicool.com
Tue, 27 Mar 2001 12:26:42 -0500 (EST)
Update of /cvs-repository/CMF/CMFDefault
In directory korak:/tmp/cvs-serv19619/CMFDefault
Modified Files:
DiscussionItem.py
Log Message:
* Regularize DiscussionItem.absolute_url
* Make 'addToFavorites' work as skinned method of target, and
work for DiscussionItems.
--- Updated File DiscussionItem.py in package CMF --
--- DiscussionItem.py 2001/03/26 21:36:32 1.6
+++ DiscussionItem.py 2001/03/27 17:26:40 1.7
@@ -151,10 +151,14 @@
content_item = container.aq_inner.aq_parent
parent_rel_url = portal_url.getRelativeUrl(content_item)
+ fmt_string = '%s/%s/talkback/%s'
+
if relative:
- return parent_rel_url + '/talkback/' + str(self.id)
+ prefix = portal_url.getPortalPath()
else:
- return portal_url() + '/' + parent_rel_url + '/talkback/' + str(self.id)
+ prefix = portal_url()
+
+ return fmt_string % ( prefix, parent_rel_url, str( self.id ) )
def getPhysicalPath(self):
"""