[Zope-Checkins]
SVN: Zope/branches/publication-refactor/lib/python/ZPublisher/
- Fix a few minor typos. I can actually browse the ZMI now.
Sidnei da Silva
sidnei at enfoldsystems.com
Mon Dec 12 14:30:51 EST 2005
Log message for revision 40751:
- Fix a few minor typos. I can actually browse the ZMI now.
Changed:
U Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py
U Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py
U Zope/branches/publication-refactor/lib/python/ZPublisher/Publish.py
-=-
Modified: Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py
===================================================================
--- Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py 2005-12-12 19:16:05 UTC (rev 40750)
+++ Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py 2005-12-12 19:30:50 UTC (rev 40751)
@@ -90,8 +90,8 @@
def close(self):
self.other.clear()
self._held = None
+ self.publication.endRequest(self, None)
self.publication = None
- self.publication.endRequest(self, None)
def processInputs(self):
"""Do any input processing that could raise errors
Modified: Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py
===================================================================
--- Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 2005-12-12 19:16:05 UTC (rev 40750)
+++ Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 2005-12-12 19:30:50 UTC (rev 40751)
@@ -16,7 +16,7 @@
from zope.event import notify
from zope.interface import implements
from zope.publisher.interfaces import IRequest, IPublication
-from zope.publisher.interfaces import NotFound
+from zope.publisher.interfaces import NotFound, IPublicationRequest
from zope.app.publication.interfaces import EndRequestEvent
from zope.app.publication.interfaces import BeforeTraverseEvent
@@ -93,7 +93,18 @@
def callObject(self, request, ob):
# Call the object the same way it's done in Zope 2.
- return mapply(ob, request.getPositionalArguments(),
+
+ # XXX Check if it's a Zope 3 or a Zope 2 request. Might not be
+ # true because someone (Five?) is saying that the Zope 2
+ # request implements IPublicationRequest so we check for the
+ # method name. Yuck.
+ if (IPublicationRequest.providedBy(request) and
+ hasattr(request, 'getPositionalArguments')):
+ args = request.getPositionalArguments()
+ else:
+ # It's a Zope 2 request.
+ args = request.args
+ return mapply(ob, args,
request, call_object, 1, missing_name,
dont_publish_class, request, bind=1)
Modified: Zope/branches/publication-refactor/lib/python/ZPublisher/Publish.py
===================================================================
--- Zope/branches/publication-refactor/lib/python/ZPublisher/Publish.py 2005-12-12 19:16:05 UTC (rev 40750)
+++ Zope/branches/publication-refactor/lib/python/ZPublisher/Publish.py 2005-12-12 19:30:50 UTC (rev 40751)
@@ -95,8 +95,9 @@
if publication.debug_mode:
response.debug_mode = publication.debug_mode
- if realm and not request.get('REMOTE_USER',None):
+ if publication.realm and not request.get('REMOTE_USER',None):
response.realm = publication.realm
+ validated_hook = publication.validated_hook
# Do any pre-traversal setup, like starting a new transaction.
publication.beforeTraversal(request)
More information about the Zope-Checkins
mailing list