Commit 0a28612a authored by Nikolay Kim's avatar Nikolay Kim

revert changes

parent b5633ae4
......@@ -425,7 +425,7 @@ class ObjectManager(CopyContainer,
# Returns a list of actual subobjects of the current object.
# If 'spec' is specified, returns only objects whose meta_type
# match 'spec'.
return [ getattr(self, id) for id in self.objectIds(spec) ]
return [ self._getOb(id) for id in self.objectIds(spec) ]
security.declareProtected(access_contents_information, 'objectItems')
def objectItems(self, spec=None):
......@@ -763,7 +763,7 @@ class ObjectManager(CopyContainer,
return self.manage_delObjects(ids=[name])
def __getitem__(self, key):
v=getattr(self, key, None)
v=self._getOb(key, None)
if v is not None: return v
if hasattr(self, 'REQUEST'):
request=self.REQUEST
......
......@@ -71,7 +71,7 @@ def boboAwareZopeTraverse(object, path_items, econtext):
while path_items:
name = path_items.pop()
if OFS.interfaces.ITraversable.providedBy(object):
object = object.unrestrictedTraverse(name, restricted=True)
object = object.restrictedTraverse(name)
else:
object = traversePathElement(object, name, path_items,
request=request)
......
......@@ -169,9 +169,6 @@ class HTTPRequest(BaseRequest):
retry_max_count = 3
def __conform__(self, iface):
return iface.__adapt__(self)
def supports_retry(self):
if self.retry_count < self.retry_max_count:
time.sleep(random.uniform(0, 2 ** (self.retry_count)))
......@@ -257,11 +254,11 @@ class HTTPRequest(BaseRequest):
def physicalPathToURL(self, path, relative=0):
""" Convert a physical path into a URL in the current context """
path = self._script + [quote(s) for s in self.physicalPathToVirtualPath(path)]
path = self._script + map(quote, self.physicalPathToVirtualPath(path))
if relative:
path.insert(0, '')
else:
path.insert(0, self.other['SERVER_URL'])
path.insert(0, self['SERVER_URL'])
return '/'.join(path)
def physicalPathFromURL(self, URL):
......@@ -453,9 +450,6 @@ class HTTPRequest(BaseRequest):
self.cookies = cookies
self.taintedcookies = taintedcookies
def __nonzero__(self):
return True
def processInputs(
self,
# "static" variables that we want to be local for speed
......@@ -1296,7 +1290,7 @@ class HTTPRequest(BaseRequest):
if n:
n = n - 1
if len(path) < n:
return default
raise KeyError, key
v = self._script + path[:n]
else:
......
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