[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - ZopePublication.py:1.12.2.1

Jim Fulton jim@zope.com
Thu, 5 Dec 2002 05:05:05 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv2894

Modified Files:
      Tag: ctheune-fix_appcontrol-branch
	ZopePublication.py 
Log Message:
Application controllers should be treated as alternative application
roots.


=== Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py 1.12 => 1.12.2.1 ===
--- Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py:1.12	Mon Nov 11 09:15:44 2002
+++ Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py	Thu Dec  5 05:05:04 2002
@@ -43,6 +43,9 @@
 
 from Zope.Proxy.ContextWrapper import ContextWrapper
 
+from Zope.App.OFS.ApplicationControl.ApplicationControl \
+     import ApplicationController
+
 # XXX Should this be imported here?
 from Transaction import get_transaction
 
@@ -134,13 +137,8 @@
 
         # If the first name is '++etc++ApplicationControl', then we should
         # get it rather than look in the database!
-        stack = request.getTraversalStack()
-        if stack:
-            name = stack[-1]
-            if name == '++etc++ApplicationController':
-                stack.pop() # consume the name
-                request.setTraversalStack(stack) # Reset the stack
-                return self.traverseName(request, None, name)
+        if '++etc++ApplicationController' in request.getTraversalStack():
+            return ProxyFactory(ApplicationController)
         
         # Open the database.
         version = request.get(self.version_cookie, '')