Commit 476bbea9 authored by 's avatar

Un-screwed the ArgData hack from 2.1.6 that caused name lookup order

to change. The new security policy machinery makes the root of the
hack unnecessary now.
parent 669f7bdd
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
__doc__='''Shared classes and functions __doc__='''Shared classes and functions
$Id: Aqueduct.py,v 1.39 2000/03/15 21:13:40 brian Exp $''' $Id: Aqueduct.py,v 1.40 2000/05/12 15:06:23 brian Exp $'''
__version__='$Revision: 1.39 $'[11:-2] __version__='$Revision: 1.40 $'[11:-2]
import Globals, os import Globals, os
from Globals import HTMLFile, Persistent from Globals import HTMLFile, Persistent
...@@ -104,42 +104,6 @@ dtml_dir=Globals.package_home(globals()) ...@@ -104,42 +104,6 @@ dtml_dir=Globals.package_home(globals())
InvalidParameter='Invalid Parameter' InvalidParameter='Invalid Parameter'
class ArgWrapper:
"""Wrap a dictionary in a way acceptable to validating
document templates."""
__roles__=None
def __init__(self):
self.__data__={}
def __setitem__(self, key, value):
self.__data__[key]=value
def __getitem__(self, key, default=strip):
result=self.__dict__['__data__'].get(key, default)
if result is not strip:
return result
raise KeyError, key
__getattr__=get=__getitem__
def has_key(self, key):
return self.__data__.has_key(key)
def keys(self):
return self.__data__.keys()
def items(self):
return self.__data__.items()
def values(self):
return self.__data__.values()
class BaseQuery(Persistent, SimpleItem.Item, class BaseQuery(Persistent, SimpleItem.Item,
Acquisition.Implicit, RoleManager): Acquisition.Implicit, RoleManager):
...@@ -158,7 +122,7 @@ class BaseQuery(Persistent, SimpleItem.Item, ...@@ -158,7 +122,7 @@ class BaseQuery(Persistent, SimpleItem.Item,
def _argdata(self, REQUEST): def _argdata(self, REQUEST):
r=ArgWrapper() r={}
try: args=self._arg try: args=self._arg
except: except:
......
...@@ -85,8 +85,8 @@ ...@@ -85,8 +85,8 @@
__doc__='''Generic Database adapter __doc__='''Generic Database adapter
$Id: DA.py,v 1.82 2000/05/11 18:54:16 jim Exp $''' $Id: DA.py,v 1.83 2000/05/12 15:06:23 brian Exp $'''
__version__='$Revision: 1.82 $'[11:-2] __version__='$Revision: 1.83 $'[11:-2]
import OFS.SimpleItem, Aqueduct, RDB import OFS.SimpleItem, Aqueduct, RDB
import DocumentTemplate, marshal, md5, base64, Acquisition, os import DocumentTemplate, marshal, md5, base64, Acquisition, os
...@@ -429,7 +429,7 @@ class DA( ...@@ -429,7 +429,7 @@ class DA(
security=getSecurityManager() security=getSecurityManager()
security.addContext(self) security.addContext(self)
try: query=apply(self.template, (p, argdata)) try: query=apply(self.template, (p,), argdata)
finally: security.removeContext(self) finally: security.removeContext(self)
if src__: return query if src__: return query
......
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