Commit 2001fb27 authored by Hanno Schlichting's avatar Hanno Schlichting

Replace self.REQUEST with ac_acquire(self, 'REQUEST')

parent 9f18a95b
......@@ -22,7 +22,7 @@ from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
from AccessControl import Unauthorized
from AccessControl.ZopeGuards import guarded_getattr
from Acquisition import Acquired, aq_inner, aq_parent, aq_base
from Acquisition import Acquired, aq_inner, aq_parent, aq_acquire, aq_base
from zExceptions import NotFound
from ZODB.POSException import ConflictError
from OFS.interfaces import ITraversable
......@@ -64,7 +64,7 @@ class Traversable:
spp = self.getPhysicalPath()
try:
toUrl = self.REQUEST.physicalPathToURL
toUrl = aq_acquire(self, 'REQUEST').physicalPathToURL
except AttributeError:
return path2url(spp[1:])
return toUrl(spp)
......@@ -78,7 +78,7 @@ class Traversable:
"""
spp = self.getPhysicalPath()
try:
toUrl = self.REQUEST.physicalPathToURL
toUrl = aq_acquire(self, 'REQUEST').physicalPathToURL
except AttributeError:
return path2url(spp) or '/'
return toUrl(spp, relative=1) or '/'
......@@ -93,7 +93,7 @@ class Traversable:
"""
spp = self.getPhysicalPath()
try:
toVirt = self.REQUEST.physicalPathToVirtualPath
toVirt = aq_acquire(self, 'REQUEST').physicalPathToVirtualPath
except AttributeError:
return path2url(spp[1:])
return path2url(toVirt(spp))
......@@ -192,7 +192,7 @@ class Traversable:
if ns:
try:
next = namespaceLookup(
ns, nm, obj, self.REQUEST)
ns, nm, obj, aq_acquire(self, 'REQUEST'))
if restricted and not validate(
obj, obj, name, next):
raise Unauthorized(name)
......@@ -256,7 +256,7 @@ class Traversable:
except (AttributeError, NotFound, KeyError), e:
# Try to look for a view
next = queryMultiAdapter((obj, self.REQUEST),
next = queryMultiAdapter((obj, aq_acquire(self, 'REQUEST')),
Interface, name)
if next is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment