[CMF-checkins] CVS: Products/CMFDefault - Favorite.py:1.10
Jens Vagelpohl
jens@zope.com
Wed, 7 Nov 2001 13:16:53 -0500
Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv8610
Modified Files:
Favorite.py
Log Message:
Fixed factory method for cases where a user makes a favorite
out of the portal root itself (CMF Tracker 402)
=== Products/CMFDefault/Favorite.py 1.9 => 1.10 ===
"""
portal_url = getToolByName(self, 'portal_url')
- relUrl = portal_url.getRelativeUrl(self.restrictedTraverse(
- remote_url))
+ portal_obj = portal_url.getPortalObject()
+ content_obj = portal_obj.restrictedTraverse( remote_url )
+ relUrl = portal_url.getRelativeUrl( content_obj )
o=Favorite( id, title, relUrl, description )
self._setObject(id,o)