[Erp5-report] r18763 - /erp5/trunk/products/ERP5OOo/OOoTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jan 17 12:36:18 CET 2008
Author: nicolas
Date: Thu Jan 17 12:36:17 2008
New Revision: 18763
URL: http://svn.erp5.org?rev=18763&view=rev
Log:
Overload pt_edit to avoid storing content as unicode
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=18763&r1=18762&r2=18763&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/OOoTemplate.py (original)
+++ erp5/trunk/products/ERP5OOo/OOoTemplate.py Thu Jan 17 12:36:17 2008
@@ -192,6 +192,14 @@
file = builder.prepareContentXml(xsl_content)
return ZopePageTemplate.pt_upload(self, REQUEST, file)
+
+ security.declareProtected('Change Page Templates', 'pt_edit')
+ def pt_edit(self, text, content_type):
+ if content_type:
+ self.content_type = str(content_type)
+ if hasattr(text, 'read'):
+ text = text.read()
+ self.write(text)
security.declareProtected('Change Page Templates', 'doSettings')
def doSettings(self, REQUEST, title, ooo_stylesheet):
More information about the Erp5-report
mailing list