Commit 92622d46 authored by Nicolas Delaby's avatar Nicolas Delaby

Stop overriding pt_edit for Zope version greater that 2.8 as ZopePageTemplate.pt_edit

is bug free and does more pretty things like calling ZCacheable_invalidate.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42747 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eea04e7b
...@@ -258,6 +258,12 @@ class OOoTemplate(ZopePageTemplate): ...@@ -258,6 +258,12 @@ class OOoTemplate(ZopePageTemplate):
file = builder.prepareContentXml(self.ooo_xml_file_id) file = builder.prepareContentXml(self.ooo_xml_file_id)
return ZopePageTemplate.pt_upload(self, REQUEST, file) return ZopePageTemplate.pt_upload(self, REQUEST, file)
if 'pt_edit' not in ZopePageTemplate.__dict__:
# Override it only for 2.8 !
# ZopePageTemplate v.2.8 inherate pt_edit from
# PageTemplate. If method is defined on ZopePageTemplate
# means we are under 2.12.
# Delete me when we drop support of 2.8
security.declareProtected('Change Page Templates', 'pt_edit') security.declareProtected('Change Page Templates', 'pt_edit')
def pt_edit(self, text, content_type): def pt_edit(self, text, content_type):
if content_type: if content_type:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment