From 5b53ad18c3b2a4ed88f62bb105194be669ab20e8 Mon Sep 17 00:00:00 2001
From: Mame Coumba Sall <mame@nexedi.com>
Date: Tue, 7 Apr 2009 12:00:25 +0000
Subject: [PATCH] modified so that website is redirected to correct url when id
 is changed

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26321 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/WebSite.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/product/ERP5/Document/WebSite.py b/product/ERP5/Document/WebSite.py
index 11845194cf..7bcce6ae18 100644
--- a/product/ERP5/Document/WebSite.py
+++ b/product/ERP5/Document/WebSite.py
@@ -85,7 +85,7 @@ class WebSiteTraversalHook(Persistent):
         i += 1
       # 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:]
+        path = website_path[0:common_index+1] + path[common_index + 1:]
     rpp = request.other.get('VirtualRootPhysicalPath', ('', ))
     i = 0
     for name in rpp[:len(path)]:
@@ -97,6 +97,7 @@ class WebSiteTraversalHook(Persistent):
     #  # Replace the last id of the path with the name which
     #  # was used to lookup the document
     #  path = path[:-1] + (self._v_request[DOCUMENT_NAME_KEY],)
+    LOG("Path",0,path)
     return path[i:]
 
   def __call__(self, container, request):
@@ -151,6 +152,7 @@ class WebSite(WebSection):
         """
           Returns the current web site (ie. self) though containment acquisition
         """
+       
         return self
 
     # Static Language Selection support
-- 
2.30.9