Commit 2a77321f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

store 'data' and 'base_data' properties in Pdata instead of PersistentMapping.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28358 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 413bb6cd
......@@ -52,6 +52,7 @@ from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from AccessControl import Unauthorized
import zope.interface
import string
from OFS.Image import Pdata
_MARKER = []
VALID_ORDER_KEY_LIST = ('user_login', 'content', 'file_name', 'input')
......@@ -1382,3 +1383,22 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, ConversionCacheMixin, Sna
# but not in http://www.some.site/at
base_url = '/'.join(base_url_list[:-1])
return base_url
security.declareProtected(Permissions.ModifyPortalContent, '_setBaseData')
def _setBaseData(self, data):
self._baseSetBaseData(Pdata(data))
security.declareProtected(Permissions.AccessContentsInformation,
'getBaseData')
def getBaseData(self, default=None):
"""return BaseData as str."""
return str(self._baseGetBaseData())
security.declareProtected(Permissions.ModifyPortalContent, '_setData')
def _setData(self, data):
self._baseSetData(Pdata(data))
security.declareProtected(Permissions.AccessContentsInformation, 'getData')
def getData(self, default=None):
"""return Data as str."""
return str(self._baseGetData())
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