Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
f5e38536
Commit
f5e38536
authored
Sep 14, 2016
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_xhtml_style: make select_language mandatory in Base_doLanguage.
also stop casting select_language to str.
parent
f4289a81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.py
...lateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.py
+3
-3
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.xml
...ateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.xml
+1
-1
No files found.
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.py
View file @
f5e38536
...
...
@@ -16,15 +16,15 @@ if website is not None and website.isStaticLanguageSelection():
referer_url
=
context
.
REQUEST
.
HTTP_REFERER
if
referer_url
:
if
select_language
==
default_language
:
redirect_url
=
re
.
sub
(
website_url_pattern
,
r
'%s\1'
%
root_website_url
,
referer_url
)
redirect_url
=
re
.
sub
(
website_url_pattern
,
r
oot_website_url
+
r'\1'
,
referer_url
)
else
:
redirect_url
=
re
.
sub
(
website_url_pattern
,
r
'%s/%s\1'
%
(
root_website_url
,
select_language
)
,
redirect_url
=
re
.
sub
(
website_url_pattern
,
r
oot_website_url
+
'/'
+
select_language
+
r'\1'
,
referer_url
)
else
:
if
select_language
==
default_language
:
redirect_url
=
root_website_url
else
:
redirect_url
=
'%s/%s'
%
(
root_website_url
,
select_language
)
redirect_url
=
root_website_url
+
'/'
+
select_language
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
redirect_url
)
else
:
# ERP5 Mode
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doLanguage.xml
View file @
f5e38536
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
select_language
=None
</string>
</value>
<value>
<string>
select_language
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
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