Commit d248a75c authored by Bartek Górny's avatar Bartek Górny

reset function; store status message;

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10362 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 83cb2870
...@@ -182,6 +182,13 @@ class OOoDocument(DMSFile, CachingMixin): ...@@ -182,6 +182,13 @@ class OOoDocument(DMSFile, CachingMixin):
return map(lambda x: x[0], self.getTargetFormatItemList()) return map(lambda x: x[0], self.getTargetFormatItemList())
security.declareProtected(Permissions.ModifyPortalContent,'reset')
def reset(self):
self.clearCache()
self.oo_data=None
m=self.returnMessage('new')
self.setStatusMessage(str(m[1]))
security.declareProtected(Permissions.ModifyPortalContent,'isAllowed') security.declareProtected(Permissions.ModifyPortalContent,'isAllowed')
def isAllowed(self, format): def isAllowed(self, format):
""" """
...@@ -262,7 +269,7 @@ class OOoDocument(DMSFile, CachingMixin): ...@@ -262,7 +269,7 @@ class OOoDocument(DMSFile, CachingMixin):
self.setTitle(meta.get('title','')) self.setTitle(meta.get('title',''))
self.setSubject(meta.get('keywords','').split()) self.setSubject(meta.get('keywords','').split())
self.setDescription(meta.get('description','')) self.setDescription(meta.get('description',''))
self.setLanguage(meta.get('language','')) #self.setLanguage(meta.get('language',''))
if meta.get('MIMEType',False): if meta.get('MIMEType',False):
self.setMimeType(meta['MIMEType']) self.setMimeType(meta['MIMEType'])
#self.setReference(meta.get('reference','')) #self.setReference(meta.get('reference',''))
......
...@@ -35,6 +35,10 @@ class OOoDocument: ...@@ -35,6 +35,10 @@ class OOoDocument:
'description' : 'mime type of OOo version', 'description' : 'mime type of OOo version',
'type' : 'string', 'type' : 'string',
'mode' : ''}, 'mode' : ''},
{ 'id' : 'status_message',
'description' : 'message about status',
'type' : 'string',
'mode' : 'w' },
) )
......
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