From d76704f80924c9fb3e0a623846d28547c1775a28 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Mon, 17 Dec 2018 12:26:17 +0000 Subject: [PATCH] [erp5_web] No need to duplicate the REQUEST actual_url key --- .../erp5_web_redirect_assist/StaticWebSite_getDocumentValue.py | 2 -- .../StaticWebSite_getRedirectSourceUrl.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_redirect_assist/StaticWebSite_getDocumentValue.py b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_redirect_assist/StaticWebSite_getDocumentValue.py index 718f84dc9c..0e7816df0e 100644 --- a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_redirect_assist/StaticWebSite_getDocumentValue.py +++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_redirect_assist/StaticWebSite_getDocumentValue.py @@ -7,8 +7,6 @@ Proxy of StaticWebSection_getDocumentValue to allow redirection # ------------------------------------------------------------------------------ # name main_template -context.REQUEST.other['actual_url'] = context.REQUEST['ACTUAL_URL'] - # catch KeyError on source_path with urls "", "?", "/?", "...&" try: context.REQUEST.other['source_path'] = name diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_redirect_assist/StaticWebSite_getRedirectSourceUrl.py b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_redirect_assist/StaticWebSite_getRedirectSourceUrl.py index 509f1b4af6..956b79d7eb 100644 --- a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_redirect_assist/StaticWebSite_getRedirectSourceUrl.py +++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_redirect_assist/StaticWebSite_getRedirectSourceUrl.py @@ -26,7 +26,7 @@ if query_string: redirect_url = '?'.join([redirect_url, query_string]) if redirect_url.find(INDEX) > -1 and not redirect_url.endswith(INDEX): redirect_url = redirect_url.replace(INDEX, '') -if redirect_url.find(INDEX) > -1 and REQUEST.other['actual_url'].find(INDEX) == -1: +if redirect_url.find(INDEX) > -1 and REQUEST['ACTUAL_URL'].find(INDEX) == -1: redirect_url = redirect_url.replace(INDEX, '') return context.Base_redirect(redirect_url, status_code=status_code) -- 2.30.9