From 7e19a4355549ff546e45845860d5fa6215b30750 Mon Sep 17 00:00:00 2001 From: Paul J Stevens Date: Thu, 8 Dec 2011 08:21:44 +0000 Subject: [PATCH 1/2] fix typo in c.akismet svn url --- dev.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev.cfg b/dev.cfg index 33fe59d..19336af 100644 --- a/dev.cfg +++ b/dev.cfg @@ -61,7 +61,7 @@ output = ${buildout:directory}/bin/sphinxupload mode = 755 [sources] -collective.akismet = svn https://svn.plone.org/svn/collective/collective.autoresizetextarea/trunk +collective.akismet = svn https://svn.plone.org/svn/collective/collective.akismet/trunk collective.autoresizetextarea = svn https://svn.plone.org/svn/collective/collective.autoresizetextarea/trunk collective.z3cform.norobots = svn https://svn.plone.org/svn/collective/collective.z3cform.norobots/trunk plone.formwidget.captcha = svn https://svn.plone.org/svn/plone/plone.formwidget.captcha/trunk/ From 6eb38ace08e484003a256be076ae2346fed71cad Mon Sep 17 00:00:00 2001 From: Paul J Stevens Date: Wed, 21 Dec 2011 15:07:33 +0100 Subject: [PATCH 2/2] fix indexing of comments (#12437) --- plone/app/discussion/patches.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plone/app/discussion/patches.py b/plone/app/discussion/patches.py index 1c591c6..507e416 100644 --- a/plone/app/discussion/patches.py +++ b/plone/app/discussion/patches.py @@ -1,13 +1,14 @@ -from Acquisition import aq_inner, aq_base, aq_parent +from zope.component import queryUtility + +from Acquisition import aq_inner, aq_parent from zope.annotation.interfaces import IAnnotations from Products.CMFPlone.utils import base_hasattr from Products.CMFPlone.utils import safe_callable -from Products.CMFCore.utils import getToolByName - from plone.app.discussion.conversation import ANNOTATION_KEY +from plone.app.discussion.interfaces import ICommentingTool # security.declareProtected(ManageZCatalogEntries, 'clearFindAndRebuild') def patchedClearFindAndRebuild(self): @@ -25,14 +26,14 @@ def patchedClearFindAndRebuild(self): obj.indexObject() annotions = IAnnotations(obj) - catalog = getToolByName(obj, 'portal_catalog', None) + discussion = queryUtility(ICommentingTool) if ANNOTATION_KEY in annotions: conversation = annotions[ANNOTATION_KEY] conversation = conversation.__of__(obj) for comment in conversation.getComments(): try: - if catalog: - catalog.indexObject(aq_base(comment)) + if discussion: + discussion.indexObject(comment) except StopIteration: # pragma: no cover pass