Commit 20fff0d3 authored by matt@zope.com's avatar matt@zope.com

Important fix! The DTMLValidate speedup to security machinery was marking

objects as changed when OFS.DTMLMethod inserted DTMLValidate as self.validate.
This sidesteps the problem by modifying the object's __dict__ instead.
parent 49f5d5b6
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""DTML Method objects.""" """DTML Method objects."""
__version__='$Revision: 1.68 $'[11:-2] __version__='$Revision: 1.69 $'[11:-2]
import History import History
from Globals import HTML, DTMLFile, MessageDialog from Globals import HTML, DTMLFile, MessageDialog
...@@ -180,7 +180,7 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager, ...@@ -180,7 +180,7 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager,
security=getSecurityManager() security=getSecurityManager()
security.addContext(self) security.addContext(self)
self.validate = security.DTMLValidate self.__dict__['validate'] = security.DTMLValidate
try: try:
if client is None: if client is None:
...@@ -200,7 +200,7 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager, ...@@ -200,7 +200,7 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager,
finally: finally:
security.removeContext(self) security.removeContext(self)
del self.validate del self.__dict__['validate']
have_key=RESPONSE.headers.has_key have_key=RESPONSE.headers.has_key
if not (have_key('content-type') or have_key('Content-Type')): if not (have_key('content-type') or have_key('Content-Type')):
......
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