[CMF-checkins] CVS: CMF/CMFDefault - Favorite.py:1.15

Tres Seaver tseaver@zope.com
Wed, 9 Jan 2002 08:48:22 -0500


Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv18193/CMFDefault

Modified Files:
	Favorite.py 
Log Message:
 - Fix typo, add unit tests for Favoites (merged from branch).

=== CMF/CMFDefault/Favorite.py 1.14 => 1.15 ===
 ##############################################################################
 """
-"""
+    Favorites represent references to other objects within the same
+    CMF site..
 
-ADD_CONTENT_PERMISSION = 'Add portal content'
+$Id$
+"""
+__version__ = "$Revision$"[11:-2]
 
 import Globals
 from Globals import HTMLFile, HTML
@@ -115,7 +118,8 @@
         Return the actual object that the Favorite is 
         linking to
         """
-        return self.restrictedTraverse(self.getRemoteUrl())
+        portal_url = getToolByName(self, 'portal_url')
+        return portal_url.getPortalObject().restrictedTraverse(self.remote_url)
 
     def edit( self, remote_url ):
         """