[Erp5-report] r19257 - /erp5/trunk/products/ERP5OOo/OOoTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Feb 12 07:23:14 CET 2008


Author: yo
Date: Tue Feb 12 07:23:14 2008
New Revision: 19257

URL: http://svn.erp5.org?rev=19257&view=rev
Log:
Get back the original StringIO in PageTemplate, because OOoTemplate does not want response-aware encoding.

Modified:
    erp5/trunk/products/ERP5OOo/OOoTemplate.py

Modified: erp5/trunk/products/ERP5OOo/OOoTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/OOoTemplate.py?rev=19257&r1=19256&r2=19257&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/OOoTemplate.py (original)
+++ erp5/trunk/products/ERP5OOo/OOoTemplate.py Tue Feb 12 07:23:14 2008
@@ -33,6 +33,7 @@
 from Products.CMFCore.DirectoryView import registerFileExtension, registerMetaType
 from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
+from TAL.TALInterpreter import FasterStringIO
 from Products.ERP5Type import PropertySheet
 from urllib import quote
 from Globals import InitializeClass, DTMLFile, get_request
@@ -154,6 +155,13 @@
     ZopePageTemplate.__init__(self,*args,**kw)
     # we store the attachments of the uploaded document
     self.OLE_documents_zipstring = None
+
+  # Re-define StringIO with the original one, because iHotfix may
+  # monkey patch it.
+  # XXX it might be better to simply disable iHotfix overriding
+  # StringIO.
+  def StringIO(self):
+    return FasterStringIO()
 
   def pt_upload(self, REQUEST, file=''):
     """Replace the document with the text in file."""




More information about the Erp5-report mailing list