Commit fb270e20 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added support for URL rewriting in web sites

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8685 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4f114748
......@@ -38,11 +38,15 @@ from Products.CMFCore.utils import UniqueObject, _checkPermission, _getAuthentic
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.User import emergency_user
from AccessControl.SecurityManagement import newSecurityManager, setSecurityManager
from Products.ERP5Type.patches.HTTPRequest import website_key
from zLOG import LOG
Domain_getattr = Domain.inheritedAttribute('__getattr__')
# Use a request key to store access attributes and prevent infinite recursion
cache_key = 'web_site_aq_cache'
class WebSite(Domain):
"""
A Web Site root class. This class is used by ERP5 Commerce
......@@ -77,10 +81,11 @@ class WebSite(Domain):
"""
Try to find a suitable document based on the
web site local naming policies as defined by
the WebSite_getDocument script """
# Use a non recursion variable
cache_key = 'web_site_aq_cache'
the WebSite_getDocument script
"""
request = self.REQUEST
# Register current web site physical path for later URL generation
if not request.has_key(website_key): request[website_key] = self.getPhysicalPath()
# First let us call the super method
dynamic = Domain._aq_dynamic(self, name)
if dynamic is not None :
......@@ -113,3 +118,4 @@ class WebSite(Domain):
raise
return document
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