[CMF-checkins] CVS: CMF - addtoFavorites.py:1.1 addtoFavorites.dtml:NONE
andrew@digicool.com
andrew@digicool.com
Thu, 28 Jun 2001 14:42:49 -0400 (EDT)
Update of /cvs-repository/CMF/CMFDefault/skins/control
In directory korak.digicool.com:/tmp/cvs-serv21237/control
Added Files:
addtoFavorites.py
Removed Files:
addtoFavorites.dtml
Log Message:
*converted to python script
--- Added File addtoFavorites.py in package CMF ---
## Script (Python) "addtoFavorites"
##title=Add item to favourites
##bind namespace=_
##parameters=
homeFolder=context.portal_membership.getHomeFolder()
if not hasattr(homeFolder, 'Favorites'):
homeFolder.manage_addPortalFolder(id='Favorites', title='Favorites')
targetFolder = getattr( homeFolder, 'Favorites' )
new_id='fav_' + str(int( context.ZopeTime()))
myPath=context.portal_url.getRelativeUrl(context)
targetFolder.invokeFactory( 'Favorite', id=new_id, title=context.Title(), remote_url=myPath)
return context.REQUEST.RESPONSE.redirect( context.absolute_url() + '/view')
--- Removed file addtoFavorites.dtml from package CMF --