[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - PublicationTraverse.py:1.8 ZopePublication.py:1.16
Jim Fulton
jim@zope.com
Fri, 20 Dec 2002 14:46:17 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv13062/Zope/App/ZopePublication
Modified Files:
PublicationTraverse.py ZopePublication.py
Log Message:
Refactored ApplicationControl so that the application controller is no
longer a root object. Rather, to avoid traversing a database object to
get to it, we create a separate RootFolder just so we can traverse it
to get to the application controller.
We (Guido and I) also renamed the global instance to have a name
starting with a lower case name. This caused the most file changes.
To do: rip out the application controller view registry in favor of
the actions menu.
=== Zope3/lib/python/Zope/App/ZopePublication/PublicationTraverse.py 1.7 => 1.8 ===
--- Zope3/lib/python/Zope/App/ZopePublication/PublicationTraverse.py:1.7 Tue Dec 17 14:03:09 2002
+++ Zope3/lib/python/Zope/App/ZopePublication/PublicationTraverse.py Fri Dec 20 14:45:46 2002
@@ -22,8 +22,6 @@
from Zope.Proxy.ContextWrapper import ContextWrapper
from Zope.App.OFS.Container.IContainer import IWriteContainer
-from Zope.App.OFS.ApplicationControl.ApplicationControl \
- import ApplicationController
from Zope.Proxy.ProxyIntrospection import removeAllProxies
from Zope.App.Traversing.Namespaces import namespaceLookup
from Zope.App.Traversing.ParameterParsing import parameterizedNameParse
=== Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py 1.15 => 1.16 ===
--- Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py:1.15 Thu Dec 19 17:54:57 2002
+++ Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py Fri Dec 20 14:45:46 2002
@@ -33,6 +33,9 @@
from Zope.Exceptions import Unauthorized
+from Zope.App.OFS.ApplicationControl.ApplicationControl \
+ import applicationControllerRoot
+
from Zope.App.Security.Registries.PrincipalRegistry \
import principalRegistry as prin_reg
@@ -128,12 +131,9 @@
# 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 stack:
+ return applicationControllerRoot
# Open the database.
version = request.get(self.version_cookie, '')