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:
- *add item here*
- Removed docstrings from some methods to avoid publishing them. From
Products.PloneHotfix20160419. [maurits]
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
def getId(self):
"""The id of the comment, as a string.
"""
# The id of the comment, as a string.
return self.id
def getText(self, targetMimetype=None):
"""The body text of a comment.
"""
# The body text of a comment.
transforms = getToolByName(self, 'portal_transforms')
if targetMimetype is None:
@ -166,8 +164,7 @@ class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable,
return text
def Title(self):
"""The title of the comment.
"""
# The title of the comment.
if self.title:
return self.title
@ -192,14 +189,12 @@ class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable,
return title
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
@security.protected(permissions.View)
def Type(self):
"""The Discussion Item content type.
"""
# The Discussion Item content type.
return self.fti_title
# CMF's event handlers assume any IDynamicType has these :(

View File

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