Apply hotfix 20160419 (#94)

Removed docstrings from some methods to avoid publishing them.
This commit is contained in:
Maurits van Rees 2016-05-04 10:40:36 +02:00 committed by Jens W. Klein
parent 13b87f030d
commit 89d542e8d2
3 changed files with 12 additions and 20 deletions

View File

@ -14,7 +14,8 @@ New:
Fixes: Fixes:
- *add item here* - Removed docstrings from some methods to avoid publishing them. From
Products.PloneHotfix20160419. [maurits]
2.4.12 (2016-04-13) 2.4.12 (2016-04-13)

View File

@ -127,13 +127,11 @@ class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable,
return self.comment_id and str(self.comment_id) or None return self.comment_id and str(self.comment_id) or None
def getId(self): def getId(self):
"""The id of the comment, as a string. # The id of the comment, as a string.
"""
return self.id return self.id
def getText(self, targetMimetype=None): def getText(self, targetMimetype=None):
"""The body text of a comment. # The body text of a comment.
"""
transforms = getToolByName(self, 'portal_transforms') transforms = getToolByName(self, 'portal_transforms')
if targetMimetype is None: if targetMimetype is None:
@ -166,8 +164,7 @@ class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable,
return text return text
def Title(self): def Title(self):
"""The title of the comment. # The title of the comment.
"""
if self.title: if self.title:
return self.title return self.title
@ -192,14 +189,12 @@ class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable,
return title return title
def Creator(self): def Creator(self):
"""The name of the person who wrote the comment. # The name of the person who wrote the comment.
"""
return self.creator or self.author_name return self.creator or self.author_name
@security.protected(permissions.View) @security.protected(permissions.View)
def Type(self): def Type(self):
"""The Discussion Item content type. # The Discussion Item content type.
"""
return self.fti_title return self.fti_title
# CMF's event handlers assume any IDynamicType has these :( # CMF's event handlers assume any IDynamicType has these :(

View File

@ -22,29 +22,25 @@ class CommentingTool(UniqueObject, SimpleItem):
id = 'portal_discussion' id = 'portal_discussion'
def reindexObject(self, object): def reindexObject(self, object):
"""Remove from catalog. # Reindex in catalog.
"""
catalog = getToolByName(self, 'portal_catalog') catalog = getToolByName(self, 'portal_catalog')
return catalog.reindexObject(object) return catalog.reindexObject(object)
indexObject = reindexObject indexObject = reindexObject
def unindexObject(self, object): def unindexObject(self, object):
"""Remove from catalog. # Remove from catalog.
"""
catalog = getToolByName(self, 'portal_catalog') catalog = getToolByName(self, 'portal_catalog')
return catalog.unindexObject(object) return catalog.unindexObject(object)
def uniqueValuesFor(self, name): def uniqueValuesFor(self, name):
""" return unique values for FieldIndex name """ # return unique values for FieldIndex name
catalog = getToolByName(self, 'portal_catalog') catalog = getToolByName(self, 'portal_catalog')
return catalog.uniqueValuesFor(name) return catalog.uniqueValuesFor(name)
def searchResults(self, REQUEST=None, **kw): def searchResults(self, REQUEST=None, **kw):
""" # Calls ZCatalog.searchResults with extra arguments that
Calls ZCatalog.searchResults with extra arguments that # limit the results to what the user is allowed to see.
limit the results to what the user is allowed to see.
"""
catalog = getToolByName(self, 'portal_catalog') catalog = getToolByName(self, 'portal_catalog')
object_provides = [IComment.__identifier__] object_provides = [IComment.__identifier__]