Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alain Takoudjou
erp5
Commits
d76704f8
Commit
d76704f8
authored
Dec 17, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web] No need to duplicate the REQUEST actual_url key
parent
aa516c7e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
3 deletions
+1
-3
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_redirect_assist/StaticWebSite_getDocumentValue.py
...rp5_web_redirect_assist/StaticWebSite_getDocumentValue.py
+0
-2
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_redirect_assist/StaticWebSite_getRedirectSourceUrl.py
...web_redirect_assist/StaticWebSite_getRedirectSourceUrl.py
+1
-1
No files found.
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_redirect_assist/StaticWebSite_getDocumentValue.py
View file @
d76704f8
...
...
@@ -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
...
...
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_redirect_assist/StaticWebSite_getRedirectSourceUrl.py
View file @
d76704f8
...
...
@@ -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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment