[Zope-Checkins]
SVN: Products.Five/branches/easter-sprint_traversal-refactor/browser/metaconfigure.py
use queryMultiAdapter instead of queryView and do that
__of__(parent)
Michael Kerrin
michael.kerrin at openapp.biz
Tue Apr 25 15:33:53 EDT 2006
Log message for revision 67605:
use queryMultiAdapter instead of queryView and do that __of__(parent)
acquisition stuff in order for security to work correctly in Zope2.
Changed:
U Products.Five/branches/easter-sprint_traversal-refactor/browser/metaconfigure.py
-=-
Modified: Products.Five/branches/easter-sprint_traversal-refactor/browser/metaconfigure.py
===================================================================
--- Products.Five/branches/easter-sprint_traversal-refactor/browser/metaconfigure.py 2006-04-25 19:26:25 UTC (rev 67604)
+++ Products.Five/branches/easter-sprint_traversal-refactor/browser/metaconfigure.py 2006-04-25 19:33:52 UTC (rev 67605)
@@ -20,6 +20,7 @@
"""
import os
+from zope import component
from zope.interface import Interface
from zope.configuration.exceptions import ConfigurationError
from zope.publisher.interfaces.browser import IBrowserRequest, \
@@ -192,11 +193,12 @@
if name in pages:
return getattr(self, pages[name])
- view = zapi.queryView(self, name, request)
+ view = component.queryMultiAdapter((self, request), name = name,
+ default = None)
if view is not None:
- return view
+ return view.__of__(self)
- m = class_.publishTraverse.__get__(self)
+ m = class_.publishTraverse.__get__(self).__of__(self)
return m(request, name)
else:
@@ -205,9 +207,10 @@
if name in pages:
return getattr(self, pages[name])
- view = zapi.queryView(self, name, request)
+ view = component.queryMultiAdapter((self, request), name = name,
+ default = None)
if view is not None:
- return view
+ return view.__of__(self)
raise NotFoundError(self, name, request)
More information about the Zope-Checkins
mailing list