[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - ZopePublication.py:1.1.2.12
Martijn Pieters
mj@zope.com
Fri, 30 Nov 2001 14:47:43 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv24123/lib/python/Zope/App/ZopePublication
Modified Files:
Tag: Zope-3x-branch
ZopePublication.py
Log Message:
Hook up the ZODB into the fray; grab the rot object from a FileStorage.
=== Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py 1.1.2.11 => 1.1.2.12 ===
def getApplication(self, request):
- if 0:
- # Open the database.
- version = request.get(self.version_cookie, '')
- conn = self.db.open(version)
+ # Open the database.
+ version = request.get(self.version_cookie, '')
+ conn = self.db.open(version)
- cleanup = Cleanup(conn.close)
- request._hold(cleanup) # Close the connection on request.close()
+ cleanup = Cleanup(conn.close)
+ request._hold(cleanup) # Close the connection on request.close()
- self.openedConnection(conn)
- conn.setDebugInfo(getattr(request, 'environ', None), request.other)
+ self.openedConnection(conn)
+ conn.setDebugInfo(getattr(request, 'environ', None), request.other)
- app = conn.root()[self.root_name]
- else:
- # shortcut: db is the app.
- app = self.db
+ app = conn.root()[self.root_name]
if hasattr(app, '__of__'):
app = app.__of__(RequestContainer(request))