[Zope-Checkins] CVS: Releases/Zope/lib/python/OFS - DTMLMethod.py:1.71

Matthew T. Kromer matt@zope.com
Fri, 2 Nov 2001 11:04:37 -0500


Update of /cvs-repository/Releases/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv23164

Modified Files:
	DTMLMethod.py 
Log Message:
Updated with Steve Alexander's patch for the DTML validate recursion fix


=== Releases/Zope/lib/python/OFS/DTMLMethod.py 1.70 => 1.71 ===
         security=getSecurityManager()
         security.addContext(self)
-        self.__dict__['validate'] = security.DTMLValidate
+        if self.__dict__.has_key('validate'):
+            first_time_through = 0
+        else:
+            self.__dict__['validate'] = security.DTMLValidate
+            first_time_through = 1
         try:
         
             if client is None:
@@ -200,8 +204,8 @@
 
         finally:
             security.removeContext(self)
-            try: del self.__dict__['validate']
-            except: pass
+            if first_time_through:
+                del self.__dict__['validate']
 
         have_key=RESPONSE.headers.has_key
         if not (have_key('content-type') or have_key('Content-Type')):