remove ZClass references. We should resync this whole patch later. (Approved by jm)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29616 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9851c606
...@@ -22,7 +22,7 @@ from Shared.DC.ZRDB import RDB ...@@ -22,7 +22,7 @@ from Shared.DC.ZRDB import RDB
from Shared.DC.ZRDB.Results import Results from Shared.DC.ZRDB.Results import Results
from App.Extensions import getBrain from App.Extensions import getBrain
from AccessControl import getSecurityManager from AccessControl import getSecurityManager
from Acquisition import aq_base from Acquisition import aq_base, aq_parent
from zLOG import LOG, INFO, ERROR from zLOG import LOG, INFO, ERROR
from string import find from string import find
from cStringIO import StringIO from cStringIO import StringIO
...@@ -187,11 +187,7 @@ def DA__call__(self, REQUEST=None, __ick__=None, src__=0, test__=0, **kw): ...@@ -187,11 +187,7 @@ def DA__call__(self, REQUEST=None, __ick__=None, src__=0, test__=0, **kw):
except: raise DatabaseError, ( except: raise DatabaseError, (
'%s is not connected to a database' % self.id) '%s is not connected to a database' % self.id)
if hasattr(self, 'aq_parent'): p = aq_parent(self) # None if no aq_parent
p=self.aq_parent
if self._isBeingAccessedAsZClassDefinedInstanceMethod():
p=p.aq_parent
else: p=None
argdata=self._argdata(REQUEST) argdata=self._argdata(REQUEST)
argdata['sql_delimiter']='\0' argdata['sql_delimiter']='\0'
...@@ -230,16 +226,13 @@ def DA__call__(self, REQUEST=None, __ick__=None, src__=0, test__=0, **kw): ...@@ -230,16 +226,13 @@ def DA__call__(self, REQUEST=None, __ick__=None, src__=0, test__=0, **kw):
else: else:
brain=self._v_brain=getBrain(self.class_file_, self.class_name_) brain=self._v_brain=getBrain(self.class_file_, self.class_name_)
zc=self._zclass
if zc is not None: zc=zc._zclass_
if type(result) is type(''): if type(result) is type(''):
f=StringIO() f=StringIO()
f.write(result) f.write(result)
f.seek(0) f.seek(0)
result=RDB.File(f,brain,p, zc) result=RDB.File(f,brain,p)
else: else:
result=Results(result, brain, p, zc) result=Results(result, brain, p)
columns=result._searchable_result_columns() columns=result._searchable_result_columns()
if test__ and columns != self._col: self._col=columns if test__ and columns != self._col: self._col=columns
......
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