[ZPT] CVS: Packages/Products/PageTemplates (Products/DC/PageTemplates) - ZopePageTemplate.py:1.9

evan@serenade.digicool.com evan@serenade.digicool.com
Fri, 18 May 2001 14:12:10 -0400


Update of /cvs-repository/Packages/Products/PageTemplates
In directory serenade:/home/evan/Zope/pt/lib/python/Products/PageTemplates

Modified Files:
	ZopePageTemplate.py 
Log Message:
Add user variable, and return the actual changed text in the edit form.



--- Updated File ZopePageTemplate.py in package Packages/Products/PageTemplates --
--- ZopePageTemplate.py	2001/05/11 23:44:51	1.8
+++ ZopePageTemplate.py	2001/05/18 18:12:09	1.9
@@ -159,6 +159,7 @@
         self.expand=expand
         self.pt_setTitle(title)
         self.pt_edit(text, content_type)
+        REQUEST.set('text', self.read()) # May not equal 'text'!
         message = "Saved changes."
         if getattr(self, '_v_warnings', None):
             message = ("<strong>Warning:</strong> <i>%s</i>" 
@@ -237,6 +238,7 @@
 
         # Execute the template in a new security context.
         security=getSecurityManager()
+        bound_names['user'] = security.getUser()
         security.addContext(self)
         try:
             return self.pt_render(extra_context=bound_names)