Commit cf7e18b6 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Fixed previous doc string of hasBaseData method since it was really wrong.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17519 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ed259cea
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore.WorkflowCore import WorkflowMethod from Products.ERP5Type.Base import WorkflowMethod
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.CMFCore.utils import _setCacheHeaders from Products.CMFCore.utils import _setCacheHeaders
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
...@@ -186,12 +186,11 @@ class TextDocument(Document, TextContent): ...@@ -186,12 +186,11 @@ class TextDocument(Document, TextContent):
return base_list[0] return base_list[0]
return Document.getContentBaseURL(self) return Document.getContentBaseURL(self)
security.declareProtected(Permissions.AccessContentsInformation, 'hasBaseData')
def hasBaseData(self): def hasBaseData(self):
""" """
This method is an override of dynamically generated method for Document class. A TextDocument store its data in the "text_content" property. Since
We need to manually override it because for some backwards compatibility there is no such thing as base_data in TextDocument, having base_data
instances of TextDocument as 'Web Page' doesn't use 'base_data' to store raw is equivalent to having some text_content.
data information. Instead they use 'text-content'
This makes results and logic of abstract Document class inconsistent.
""" """
return self.hasTextContent() return self.hasTextContent()
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