From ee907b08130cbb93fd0d089b43b3d4db7e8ec9bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Fri, 2 Aug 2013 14:58:59 +0200 Subject: [PATCH] =?utf8?q?Mise=20en=20commentaire=20d'un=20code=20non=20g?= =?utf8?q?=C3=A9n=C3=A9rique.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/photo_theme/homepage_dispatcher.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/skins/photo_theme/homepage_dispatcher.py b/skins/photo_theme/homepage_dispatcher.py index 57262be..443c164 100755 --- a/skins/photo_theme/homepage_dispatcher.py +++ b/skins/photo_theme/homepage_dispatcher.py @@ -3,6 +3,7 @@ from Products.CMFCore.utils import getToolByName from ZTUtils import make_query as mq from Products.CMFDefault.utils import Message as _ +utool = getToolByName(context, 'portal_url') req = context.REQUEST resp = req.RESPONSE came_from = req.form.get('came_from') @@ -16,13 +17,14 @@ if came_from : came_from = '%s?%s&%s' % (url, qs, mq(portal_status_message=_('Login success'))) return resp.redirect(came_from) -else : - from Products.realis.utils import searchContentsWithLocalRolesForAuthenticatedUser as search - results = search(context, portal_type='Portfolio') - if results : - atool = getToolByName(context, 'portal_actions') - return context.setRedirect(atool, 'user/my_albums', portal_status_message=_('Login success')) - else : - utool = getToolByName(context, 'portal_url') - return resp.redirect('%s?%s' % (utool(), mq(portal_status_message=_('Login success')))) - \ No newline at end of file +# else : +# from Products.realis.utils import searchContentsWithLocalRolesForAuthenticatedUser as search +# results = search(context, portal_type='Portfolio') +# if results : +# atool = getToolByName(context, 'portal_actions') +# return context.setRedirect(atool, 'user/my_albums', portal_status_message=_('Login success')) +# else : +# utool = getToolByName(context, 'portal_url') +# return resp.redirect('%s?%s' % (utool(), mq(portal_status_message=_('Login success')))) + +return resp.redirect('%s?%s' % (utool(), mq(portal_status_message=_('Login success')))) \ No newline at end of file -- 2.20.1