Log message for revision 72205:
  - Collector #2269: fixed broken FTP support for ZPT
  

Changed:
  U   Zope/branches/2.10/doc/CHANGES.txt
  U   Zope/branches/2.10/lib/python/Products/PageTemplates/ZopePageTemplate.py
  U   
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py

-=-
Modified: Zope/branches/2.10/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.10/doc/CHANGES.txt  2007-01-24 10:04:38 UTC (rev 72204)
+++ Zope/branches/2.10/doc/CHANGES.txt  2007-01-24 10:08:19 UTC (rev 72205)
@@ -12,6 +12,8 @@
 
       - Collector #2261: Acquisition when creating objects via Webdav.
 
+      - Collector #2269: fixed broken FTP support for ZPT
+
   Zope 2.10.2 beta 1 (2007/01/14)
 
     Bugs fixed

Modified: 
Zope/branches/2.10/lib/python/Products/PageTemplates/ZopePageTemplate.py
===================================================================
--- Zope/branches/2.10/lib/python/Products/PageTemplates/ZopePageTemplate.py    
2007-01-24 10:04:38 UTC (rev 72204)
+++ Zope/branches/2.10/lib/python/Products/PageTemplates/ZopePageTemplate.py    
2007-01-24 10:08:19 UTC (rev 72205)
@@ -359,7 +359,7 @@
     security.declareProtected(ftp_access, 'manage_FTPget')
     def manage_FTPget(self):
         "Get source for FTP download"
-        result = self.pt_render()
+        result = self.read()
         return result.encode(self.output_encoding)
 
     security.declareProtected(view_management_screens, 'html')

Modified: 
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
===================================================================
--- 
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
  2007-01-24 10:04:38 UTC (rev 72204)
+++ 
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
  2007-01-24 10:08:19 UTC (rev 72205)
@@ -249,7 +249,15 @@
         pt = self.app.pt1
         self.assertEqual(pt.document_src(), self.text)
 
+    def testFTPGet(self):
+        # check for bug #2269
+        request = self.app.REQUEST
+        text = '<span tal:content="string:foobar"></span>'
+        self._addPT('pt1', text=text, REQUEST=request)
+        result = self.app.pt1.manage_FTPget()
+        self.assertEqual(result, text)
 
+
 class ZPTMacros(zope.component.testing.PlacelessSetup, unittest.TestCase):
 
     def setUp(self):

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to