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
e0b262d6
Commit
e0b262d6
authored
Dec 18, 2017
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web: add root object to ERP5Site_getWebSiteDomainDict for handling absolute urls in mhtml
parent
73471a13
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/ERP5Site_getWebSiteDomainDict.py
...em/portal_skins/erp5_web/ERP5Site_getWebSiteDomainDict.py
+19
-1
No files found.
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/ERP5Site_getWebSiteDomainDict.py
View file @
e0b262d6
...
...
@@ -5,4 +5,22 @@
# if domain != "":
# domain_dict[domain] = web_site
# return domain_dict
return
{}
#return {
# "softinst73908.host.vifib.net": context.getPortalObject().restrictedTraverse("/")
#}
portal
=
context
.
getPortalObject
()
domain_dict
=
{
# "domain.com": object,
}
root_object
=
portal
.
restrictedTraverse
(
"/"
)
root_url
=
root_object
.
absolute_url
()
if
root_url
.
startswith
(
"http://"
):
root_url
=
root_url
[
7
:]
elif
root_url
.
startswith
(
"https://"
):
root_url
=
root_url
[
8
:]
domain_end
=
root_url
.
find
(
"/"
)
if
domain_end
!=
-
1
:
root_url
=
root_url
[:
domain_end
]
if
root_url
and
root_url
not
in
domain_dict
:
domain_dict
[
root_url
]
=
root_object
return
domain_dict
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