Commit 52b798b3 authored by Nicolas Delaby's avatar Nicolas Delaby

Backward compatibility code for replacement of text_format by content_type



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35324 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2da2dc10
......@@ -377,3 +377,30 @@ class TextDocument(BaseConvertableAndFileMixin, CachedConvertableMixin,
self._setBaseData(text_content)
self._setBaseContentType(content_type)
return message
# Backward compatibility for replacement of text_format by content_type
security.declareProtected(Permissions.AccessContentsInformation,
'getTextFormat')
def getTextFormat(self, default=_MARKER):
"""
"""
LOG('TextDocument', WARNING,
'Usage of text_format is deprecated, use text_content instead')
return self.getContentType(default)
security.declareProtected(Permissions.ModifyPortalContent, 'setTextFormat')
def setTextFormat(self, value):
"""
"""
LOG('TextDocument', WARNING,
'Usage of text_format is deprecated, use text_content instead')
return self.setContentType(value)
security.declareProtected(Permissions.ModifyPortalContent,
'_setTextFormat')
def _setTextFormat(self, value):
"""
"""
LOG('TextDocument', WARNING,
'Usage of text_format is deprecated, use text_content instead')
return self._setContentType(value)
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