Commit 2ba6011c authored by Jean-Paul Smets's avatar Jean-Paul Smets

Try to make the request temp parameter more robust (revert this change if it...

Try to make the request temp parameter more robust (revert this change if it causes more troubles than solution)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21181 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 09e74cf2
......@@ -60,7 +60,9 @@ class WebSiteTraversalHook(Persistent):
# Every Web Section acts as a mini site though layout for document editing is the root layout
#website_path = self._v_request.get(WEBSECTION_KEY, self._v_request.get(WEBSITE_KEY, None))
# Only consider Web Site for absolute_url
website_path = self._v_request.get(WEBSITE_KEY, None)
request = getattr(self, '_v_request', None)
if request is None: request = self._v_request = get_request()
website_path = request.get(WEBSITE_KEY, None)
if website_path:
website_path = tuple(website_path) # Make sure all path are tuples
path = tuple(path) # Make sure all path are tuples
......@@ -80,7 +82,7 @@ class WebSiteTraversalHook(Persistent):
# Insert the web site path after the common part of the path
if path_len > common_index + 1:
path = website_path + path[common_index + 1:]
rpp = self._v_request.other.get('VirtualRootPhysicalPath', ('', ))
rpp = request.other.get('VirtualRootPhysicalPath', ('', ))
i = 0
for name in rpp[:len(path)]:
if path[i] == name:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment