indexes for IComment added to override the IConversation indexes.

svn path=/plone.app.discussion/trunk/; revision=27838
This commit is contained in:
Timo Stollenwerk
2009-07-06 16:56:09 +00:00
parent fa2f961ebe
commit a946fb54fa
3 changed files with 30 additions and 4 deletions
+16 -4
View File
@@ -12,17 +12,15 @@ from Products.CMFCore.interfaces import IContentish
from Products.ZCatalog.interfaces import IZCatalog
from plone.indexer import indexer
from plone.app.discussion.interfaces import IConversation, IComment
from plone.indexer import indexer
from plone.indexer.interfaces import IIndexer
MAX_DESCRIPTION=25
# Conversation Indexers
from plone.indexer.interfaces import IIndexer
@indexer(IContentish, IZCatalog)
def total_comments(object):
conversation = IConversation(object)
@@ -89,3 +87,17 @@ def modified(object):
object.modification_date.hour,
object.modification_date.minute,
object.modification_date.second)
# Override the conversation indexers for comments
@indexer(IComment)
def comments_total_comments(object):
return None
@indexer(IComment)
def comments_last_comment_date(object):
return None
@indexer(IComment)
def comments_commentators(object):
return None