From b7206bf3b2e6b8d380e30e646c366beed91b88b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Wed, 2 Apr 2014 11:04:14 +0200 Subject: [PATCH] =?utf8?q?getattr=20->=20restrictedTraverse=C2=A0:=20si=20?= =?utf8?q?on=20utilise=20geattr=20au=20lieu=20de=20restrictedTraverse,=20a?= =?utf8?q?lors=20la=20variable=20globale=20=C2=AB=C2=A0request=C2=A0=C2=BB?= =?utf8?q?=20dans=20une=20zpt=20est=20la=20cha=C3=AEne=20de=20caract=C3=A8?= =?utf8?q?re=20"Special=20Object=20Used=20to=20Force=20Acquisition"=20au?= =?utf8?q?=20lieu=20d'=C3=AAtre=20une=20instance=20de=20HTTPRequest=20:-/.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/selectioncontext.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/skins/selectioncontext.py b/skins/selectioncontext.py index 36727f6..8539a4e 100644 --- a/skins/selectioncontext.py +++ b/skins/selectioncontext.py @@ -60,7 +60,8 @@ if ajax == True : photoPath = list(photo.getPhysicalPath()) photoPath.insert(portalDepth, 'selectioncontext') options['lastBcUrl'] = toUrl(photoPath) - meth = getattr(photo, 'photo_view_ajax_template') + app = context.restrictedTraverse('/') + meth = app.restrictedTraverse(photo.getPhysicalPath() + ('photo_view_ajax_template',)) return meth(req, resp, **options) @@ -134,5 +135,6 @@ options['breadcrumbs'] = breadcrumbs ti = photo.getTypeInfo() method_id = ti.queryMethodID('view', context=photo) -meth = getattr(photo, method_id) +app = context.restrictedTraverse('/') +meth = app.restrictedTraverse(photo.getPhysicalPath() + (method_id,)) return meth(req, resp, **options) -- 2.20.1