[CMF-checkins] CVS: Products/CMFDefault - DiscussionTool.py:1.14.20.4

Sidnei da Silva sidnei at awkly.org
Thu Mar 17 13:10:32 EST 2005


Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv32092

Modified Files:
      Tag: CMF-1_4-branch
	DiscussionTool.py 
Log Message:
Fix for CMF 1.4 on Zope 2.8. For some reason, it works with and without the patch on 2.7


=== Products/CMFDefault/DiscussionTool.py 1.14.20.3 => 1.14.20.4 ===
--- Products/CMFDefault/DiscussionTool.py:1.14.20.3	Tue Mar  8 04:19:55 2005
+++ Products/CMFDefault/DiscussionTool.py	Thu Mar 17 13:10:32 2005
@@ -23,6 +23,7 @@
 from Products.CMFCore.utils import UniqueObject, getToolByName
 from Products.CMFCore.CMFCorePermissions import ManagePortal
 from Products.CMFCore.CMFCorePermissions import ModifyPortalContent
+from Products.CMFCore.interfaces.Discussions import DiscussionResponse
 
 from utils import _dtmldir
 from DiscussionItem import DiscussionItemContainer
@@ -98,9 +99,10 @@
         if not self.isDiscussionAllowedFor( content ):
             raise DiscussionNotAllowed
 
-        talkback = getattr( aq_base(content), 'talkback', None )
-        if not talkback:
-            talkback = self._createDiscussionFor(content)
+        if not DiscussionResponse.isImplementedBy(content):
+            talkback = getattr( aq_base(content), 'talkback', None )
+            if not talkback:
+                talkback = self._createDiscussionFor(content)
 
         return content.talkback # Return wrapped talkback
 



More information about the CMF-checkins mailing list