From 37b96c363bea91979f313cda4fe484666141b9be Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 20 Jan 2011 19:27:06 +0000 Subject: [PATCH 01/22] Switch to version 2.x for development as a core component. svn path=/plone.app.discussion/trunk/; revision=46968 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 43c5255..67997ce 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ import sys from setuptools import setup, find_packages -version = '1.0bRC1' +version = '2.0RC1' install_requires = [ 'setuptools', From c15c898565521e30474cad77eaa9c8513eb3bd07 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 20 Jan 2011 19:37:54 +0000 Subject: [PATCH 02/22] Remove collective.autopermission dependency. svn path=/plone.app.discussion/trunk/; revision=46969 --- CHANGES.txt | 7 +++++++ plone/app/discussion/permissions.zcml | 2 -- setup.py | 1 - 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index cd15295..c152853 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,13 @@ Changelog ========= +2.0RC1 (unreleased) +------------------- + +- Remove collective.autopermission dependency that has become unnecessary in + Plone 4.1. + [timo] + 1.0RC1 (unreleased) ------------------- diff --git a/plone/app/discussion/permissions.zcml b/plone/app/discussion/permissions.zcml index e37f758..c5b090c 100644 --- a/plone/app/discussion/permissions.zcml +++ b/plone/app/discussion/permissions.zcml @@ -2,8 +2,6 @@ xmlns="http://namespaces.zope.org/zope" i18n_domain="plone.app.discussion"> - - Date: Thu, 20 Jan 2011 19:38:26 +0000 Subject: [PATCH 03/22] Enable ajaxify comment deletion again ([thomasdesvenain]). This has been disabled in 1.0b12 because of problems with Plone 3. svn path=/plone.app.discussion/trunk/; revision=46970 --- CHANGES.txt | 4 ++++ plone/app/discussion/browser/javascripts/comments.js | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c152853..ccf658e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,10 @@ Changelog 2.0RC1 (unreleased) ------------------- +- Enable ajaxify comment deletion again ([thomasdesvenain]). This has been + disabled in 1.0b12 because of problems with Plone 3. + [timo] + - Remove collective.autopermission dependency that has become unnecessary in Plone 4.1. [timo] diff --git a/plone/app/discussion/browser/javascripts/comments.js b/plone/app/discussion/browser/javascripts/comments.js index 5a0cff8..1664708 100644 --- a/plone/app/discussion/browser/javascripts/comments.js +++ b/plone/app/discussion/browser/javascripts/comments.js @@ -168,7 +168,6 @@ /********************************************************************** * Delete a comment and its answers. **********************************************************************/ - /* $("input[name='form.button.DeleteComment']").live('click', function () { var trigger = this; var form = $(this).parents("form"); @@ -210,7 +209,7 @@ } }); return false; - });*/ + }); /********************************************************************** * By default, hide the reply and the cancel button for the regular add From fb0ca6c7950892856e2d5c3e16d14f04fe7d2122 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 20 Jan 2011 20:04:38 +0000 Subject: [PATCH 04/22] Replace tabs with whitespace. svn path=/plone.app.discussion/trunk/; revision=46974 --- .../browser/javascripts/comments.js | 118 +++++++++--------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/plone/app/discussion/browser/javascripts/comments.js b/plone/app/discussion/browser/javascripts/comments.js index 1664708..f486a0d 100644 --- a/plone/app/discussion/browser/javascripts/comments.js +++ b/plone/app/discussion/browser/javascripts/comments.js @@ -4,9 +4,9 @@ * ******************************************************************************/ (function ($) { - // This unnamed function allows us to use $ inside of a block of code - // without permanently overwriting $. - // http://docs.jquery.com/Using_jQuery_with_Other_Libraries + // This unnamed function allows us to use $ inside of a block of code + // without permanently overwriting $. + // http://docs.jquery.com/Using_jQuery_with_Other_Libraries /************************************************************************** * Create a reply-to-comment form right beneath the form that is passed to * the function. We do this by copying the regular comment form and @@ -89,54 +89,54 @@ **************************************************************************/ $(window).load(function () { - /********************************************************************** - * If the user has hit the reply button of a reply-to-comment form - * (form was submitted with a value for the "in_reply_to" field in the - * request), create a reply-to-comment form right under this comment. - **********************************************************************/ - var post_comment_div = $("#commenting"); - var in_reply_to_field = - post_comment_div.find("input[name='form.widgets.in_reply_to']"); - if (in_reply_to_field.val() !== "") { - var current_reply_id = "#" + in_reply_to_field.val(); - var current_reply_to_div = $(".discussion").find(current_reply_id); - $.createReplyForm(current_reply_to_div); - $.clearForm(post_comment_div); - } + /********************************************************************** + * If the user has hit the reply button of a reply-to-comment form + * (form was submitted with a value for the "in_reply_to" field in the + * request), create a reply-to-comment form right under this comment. + **********************************************************************/ + var post_comment_div = $("#commenting"); + var in_reply_to_field = + post_comment_div.find("input[name='form.widgets.in_reply_to']"); + if (in_reply_to_field.val() !== "") { + var current_reply_id = "#" + in_reply_to_field.val(); + var current_reply_to_div = $(".discussion").find(current_reply_id); + $.createReplyForm(current_reply_to_div); + $.clearForm(post_comment_div); + } - /********************************************************************** - * If the user hits the "reply" button of an existing comment, create a - * reply form right beneath this comment. - **********************************************************************/ - $(".reply-to-comment-button").bind("click", function (e) { - var comment_div = $(this).parents().filter(".comment"); - $.createReplyForm(comment_div); - $.clearForm(comment_div); - }); + /********************************************************************** + * If the user hits the "reply" button of an existing comment, create a + * reply form right beneath this comment. + **********************************************************************/ + $(".reply-to-comment-button").bind("click", function (e) { + var comment_div = $(this).parents().filter(".comment"); + $.createReplyForm(comment_div); + $.clearForm(comment_div); + }); - /********************************************************************** - * If the user hits the "clear" button of an open reply-to-comment form, - * remove the form and show the "reply" button again. - **********************************************************************/ + /********************************************************************** + * If the user hits the "clear" button of an open reply-to-comment form, + * remove the form and show the "reply" button again. + **********************************************************************/ $("#commenting #form-buttons-cancel").bind("click", function (e) { - e.preventDefault(); - var reply_to_comment_button = $(this). - parents(). - filter(".comment"). - find(".reply-to-comment-button"); + e.preventDefault(); + var reply_to_comment_button = $(this). + parents(). + filter(".comment"). + find(".reply-to-comment-button"); - /* Find the reply-to-comment form and hide and remove it again. */ - $.reply_to_comment_form = $(this).parents().filter(".reply"); - $.reply_to_comment_form.slideUp("slow", function () { - $(this).remove(); - }); + /* Find the reply-to-comment form and hide and remove it again. */ + $.reply_to_comment_form = $(this).parents().filter(".reply"); + $.reply_to_comment_form.slideUp("slow", function () { + $(this).remove(); + }); - /* Show the reply-to-comment button again. */ - reply_to_comment_button.css("display", "inline"); + /* Show the reply-to-comment button again. */ + reply_to_comment_button.css("display", "inline"); - }); + }); /********************************************************************** @@ -168,7 +168,7 @@ /********************************************************************** * Delete a comment and its answers. **********************************************************************/ - $("input[name='form.button.DeleteComment']").live('click', function () { + $("input[name='form.button.DeleteComment']").live('click', function () { var trigger = this; var form = $(this).parents("form"); var data = $(form).serialize(); @@ -211,24 +211,24 @@ return false; }); - /********************************************************************** - * By default, hide the reply and the cancel button for the regular add - * comment form. - **********************************************************************/ - $(".reply").find("input[name='form.buttons.reply']") - .css("display", "none"); - $(".reply").find("input[name='form.buttons.cancel']") - .css("display", "none"); + /********************************************************************** + * By default, hide the reply and the cancel button for the regular add + * comment form. + **********************************************************************/ + $(".reply").find("input[name='form.buttons.reply']") + .css("display", "none"); + $(".reply").find("input[name='form.buttons.cancel']") + .css("display", "none"); - /********************************************************************** - * By default, show the reply button only when Javascript is enabled. - * Otherwise hide it, since the reply functions only work with JS - * enabled. - **********************************************************************/ - $(".reply-to-comment-button").css("display" , "inline"); + /********************************************************************** + * By default, show the reply button only when Javascript is enabled. + * Otherwise hide it, since the reply functions only work with JS + * enabled. + **********************************************************************/ + $(".reply-to-comment-button").css("display" , "inline"); - }); + }); //#JSCOVERAGE_ENDIF From 471b87cfdf5f78e29aa5ba27c19a84139135e1fd Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 20 Jan 2011 20:37:14 +0000 Subject: [PATCH 05/22] Discussion is disabled by default only in p.a.discussion 2.x. svn path=/plone.app.discussion/trunk/; revision=46976 --- CHANGES.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ccf658e..c7ef789 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,9 @@ Changelog 2.0RC1 (unreleased) ------------------- +- Disable discussion by default. + [timo] + - Enable ajaxify comment deletion again ([thomasdesvenain]). This has been disabled in 1.0b12 because of problems with Plone 3. [timo] @@ -33,9 +36,6 @@ Changelog - Avoid sending multiple notification emails to the same person when he has commented multiple times. [maurits] - -- Disable discussion by default. - [timo] - Move discussion action item from actionicons.xml to actions.xml to avoid deprecation warning. From 4ab29000a699ae0ddb6059abea529d320029745d Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 20 Jan 2011 20:38:50 +0000 Subject: [PATCH 06/22] Import Owned from OFS.owner to avoid deprecation warnings. svn path=/plone.app.discussion/trunk/; revision=46977 --- CHANGES.txt | 5 ++++- plone/app/discussion/comment.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c7ef789..0004577 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,9 +4,12 @@ Changelog 2.0RC1 (unreleased) ------------------- +- Import Owned from OFS.owner to avoid deprecation warnings. + [timo] + - Disable discussion by default. [timo] - + - Enable ajaxify comment deletion again ([thomasdesvenain]). This has been disabled in 1.0b12 because of problems with Plone 3. [timo] diff --git a/plone/app/discussion/comment.py b/plone/app/discussion/comment.py index d66a6bb..356cc4a 100644 --- a/plone/app/discussion/comment.py +++ b/plone/app/discussion/comment.py @@ -20,7 +20,7 @@ from zope.interface import implements from Acquisition import aq_parent, aq_base, Implicit from AccessControl.Role import RoleManager -from AccessControl.Owned import Owned +from OFS.owner import Owned from persistent import Persistent From cb60df8c60718d9653d638603e02ca9caf7dd273 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 20 Jan 2011 20:58:40 +0000 Subject: [PATCH 07/22] todo update. svn path=/plone.app.discussion/trunk/; revision=46978 --- TODO-Plone4.x.txt | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/TODO-Plone4.x.txt b/TODO-Plone4.x.txt index b66d711..1e34989 100644 --- a/TODO-Plone4.x.txt +++ b/TODO-Plone4.x.txt @@ -1,28 +1,14 @@ -=============================================================== -TODO LIST FOR THE PLONE 4.x INTEGRATION OF PLONE.APP.DISCUSSION -=============================================================== -DONE 1) Install pad by default, don't show it as add-on Product. - -DONE 2) Set "globally enable comments" to false by default. - -3) Remove the "comment"-type from plone.app.vocabularies.types.BAD_TYPES and - remove the monkey patch in __init__.py. - -4) Remove all Plone3 related code. - - -Plone 4 only features ---------------------- +plone.app.discussion 2.x features only +====================================== - AJAX comment deletion binding (jQuery 1.4) http://dev.plone.org/plone/changeset/45188 +- Disable discussion by default. + http://dev.plone.org/plone/changeset/46143 -Plone 4.1 only features ------------------------ - -- p.a.discussion trunk requires plone.app.controlpanel >= 2.1b1 to make the +- p.a.discussion 2.x requires plone.app.controlpanel >= 2.1b1 to make the comment moderation switch in the discussion control panel work. http://pypi.python.org/pypi/plone.app.controlpanel#b1-2011-01-03 @@ -31,9 +17,16 @@ Plone 4.1 only features (Make sure the ConfigurationChangedEvent is fired when the types control panel setting changed. [timo]) +=============================================================== +TODO LIST FOR THE PLONE 4.x INTEGRATION OF PLONE.APP.DISCUSSION +=============================================================== -Plone core only features ------------------------- +DONE 1) Install pad by default, don't show it as add-on Product. -- Disable discussion by default. - http://dev.plone.org/plone/changeset/46143 +DONE 2) Set "globally enable comments" to false by default. + +DONE 3) Remove the "comment"-type from plone.app.vocabularies.types.BAD_TYPES and + remove the monkey patch in __init__.py. + +4) Remove all Plone3 related code. + \ No newline at end of file From 0c435dc9ca2ad6d7010e8cd8dd7ccc77c3a0f770 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Wed, 26 Jan 2011 08:15:14 +0000 Subject: [PATCH 08/22] Check if the current user has configured an e-mail address for the email notification option. Refs #11428 svn path=/plone.app.discussion/trunk/; revision=47069 --- CHANGES.txt | 5 +++++ plone/app/discussion/browser/comments.py | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0004577..589c5fa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,10 @@ Changelog 2.0RC1 (unreleased) ------------------- +- Check if the current user has configured an e-mail address for the email + notification option. This fixes http://dev.plone.org/plone/ticket/11428. + [timo] + - Import Owned from OFS.owner to avoid deprecation warnings. [timo] @@ -18,6 +22,7 @@ Changelog Plone 4.1. [timo] + 1.0RC1 (unreleased) ------------------- diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index 0c2a9e4..f7fd9c3 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -106,10 +106,17 @@ class CommentForm(extensible.ExtensibleForm, form.Form): registry = queryUtility(IRegistry) settings = registry.forInterface(IDiscussionSettings, check=False) - portal_membership = getToolByName(self.context, 'portal_membership') + mtool = getToolByName(self.context, 'portal_membership') + member = mtool.getAuthenticatedMember() + member_email = member.getProperty('email') - if not settings.user_notification_enabled or portal_membership.isAnonymousUser(): - self.widgets['user_notification'].mode = interfaces.HIDDEN_MODE + # Hide the user_notification checkbox if user notification is disabled + # or the user is not logged in. Also check if the user has a valid email + # address + if member_email == '' or \ + not settings.user_notification_enabled or \ + mtool.isAnonymousUser(): + self.widgets['user_notification'].mode = interfaces.HIDDEN_MODE def updateActions(self): super(CommentForm, self).updateActions() From 39beac094c6fd77086558a9b4a32664982fa8a8e Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 27 Jan 2011 13:52:19 +0000 Subject: [PATCH 09/22] Fix email notification docs. svn path=/plone.app.discussion/trunk/; revision=47095 --- docs/source/email-notification.txt | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/docs/source/email-notification.txt b/docs/source/email-notification.txt index 1384b80..6b5c709 100644 --- a/docs/source/email-notification.txt +++ b/docs/source/email-notification.txt @@ -72,22 +72,7 @@ comment has been added to a page. To create custom email notifications, register a new event subscriber or override an existing one. - -Plone 3 Event Subscribers -------------------------- - -*plone/app/discussion/subscribers.zcml* +*plone/app/discussion/notifications.zcml* .. literalinclude:: ../../plone/app/discussion/notifications.zcml :encoding: utf-8 - :lines: 6-24 - - -Plone 4 Event Subscribers -------------------------- - -*plone/app/discussion/subscribers.zcml* - -.. literalinclude:: ../../plone/app/discussion/notifications.zcml - :encoding: utf-8 - :lines: 25-41 From 0a0e69d47dac57e0f34f98d2d839e34e0d4aa3aa Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 7 Feb 2011 11:48:24 +0000 Subject: [PATCH 10/22] Do not check for a comment review workflow when sending out a moderator email notification. This fixes http://dev.plone.org/plone/ticket/11444. Refs #11444 svn path=/plone.app.discussion/trunk/; revision=47292 --- CHANGES.txt | 3 +++ plone/app/discussion/comment.py | 7 ------- plone/app/discussion/tests/test_notifications.py | 13 ------------- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 589c5fa..3d51b4a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,6 +22,9 @@ Changelog Plone 4.1. [timo] +- Do not check for a comment review workflow when sending out a moderator email + notification. This fixes http://dev.plone.org/plone/ticket/11444. + 1.0RC1 (unreleased) ------------------- diff --git a/plone/app/discussion/comment.py b/plone/app/discussion/comment.py index 356cc4a..13d8260 100644 --- a/plone/app/discussion/comment.py +++ b/plone/app/discussion/comment.py @@ -284,13 +284,6 @@ def notify_moderator(obj, event): if not settings.moderator_notification_enabled: return - # Check if the current workflow implements a pending state. - wf_tool = getToolByName(obj, 'portal_workflow') - comment_workflow = wf_tool.getChainForPortalType('Discussion Item')[0] - comment_workflow = wf_tool[comment_workflow] - if 'pending' not in comment_workflow.states: - return - # Get informations that are necessary to send an email mail_host = getToolByName(obj, 'MailHost') portal_url = getToolByName(obj, 'portal_url') diff --git a/plone/app/discussion/tests/test_notifications.py b/plone/app/discussion/tests/test_notifications.py index ae78ac4..86b05ad 100644 --- a/plone/app/discussion/tests/test_notifications.py +++ b/plone/app/discussion/tests/test_notifications.py @@ -256,18 +256,5 @@ class TestModeratorNotificationUnit(PloneTestCase): self.conversation.addComment(comment) self.assertEquals(len(self.mailhost.messages), 0) - def test_do_not_notify_moderator_when_moderation_workflow_is_disabled(self): - # Disable comment moderation and make sure no email is send to the - # moderator. - self.portal.portal_types['Document'].allow_discussion = True - self.portal.portal_workflow.setChainForPortalTypes( - ('Discussion Item',), - ('one_state_workflow',)) - - comment = createObject('plone.Comment') - comment.text = 'Comment text' - self.conversation.addComment(comment) - self.assertEquals(len(self.mailhost.messages), 0) - def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) From 809946d54ad49b92ad7c0c4ec66f65b26136e693 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 7 Feb 2011 15:00:46 +0000 Subject: [PATCH 11/22] Prepare 2.0a1 release. svn path=/plone.app.discussion/trunk/; revision=47299 --- CHANGES.txt | 33 +++++++++++++++++++++++++-------- README.txt | 20 ++++++++++++++++---- docs/source/conf.py | 2 +- setup.py | 2 +- 4 files changed, 43 insertions(+), 14 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3d51b4a..212bc5b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,13 +1,13 @@ Changelog ========= -2.0RC1 (unreleased) -------------------- +2.0a1 (2011-02-07) +------------------ -- Check if the current user has configured an e-mail address for the email - notification option. This fixes http://dev.plone.org/plone/ticket/11428. +- Split up development into two branches. The 1.x branch will be for Plone 3.x + and Plone 4.0.x and the 2.x branch will be for Plone 4.1 and beyond. [timo] - + - Import Owned from OFS.owner to avoid deprecation warnings. [timo] @@ -22,11 +22,28 @@ Changelog Plone 4.1. [timo] -- Do not check for a comment review workflow when sending out a moderator email - notification. This fixes http://dev.plone.org/plone/ticket/11444. + +1.0 (2011-02-07) +---------------- + +- Do not check for a comment review workflow when sending out a moderator email + notification. This fixes http://dev.plone.org/plone/ticket/11444. + [timo] + +- Check if the current user has configured an e-mail address for the email + notification option. This fixes http://dev.plone.org/plone/ticket/11428. + [timo] -1.0RC1 (unreleased) +1.0RC2 (2011-01-24) +------------------- + +- Remove moderation_enabled setting from registry to avoid migration problems + to 1.0RC1. This fixes http://dev.plone.org/plone/ticket/11419. + [timo] + + +1.0RC1 (2011-01-22) ------------------- - Always show existing comments, even if commenting is disabled. diff --git a/README.txt b/README.txt index b794c30..5c13cfb 100644 --- a/README.txt +++ b/README.txt @@ -5,15 +5,21 @@ plone.app.discussion aims to be the new commenting system for Plone. It was initially developed as part of the Google Summer of Code 2009 by Timo Stollenwerk (student) and Martin Aspeli (mentor). -For the roadmap of the project see our `Pivotal Tracker`_. - -.. _`Pivotal Tracker`: http://www.pivotaltracker.com/projects/15135 +plone.app.discussion is an add-on product for Plone 3.3.x and 4.0.x and will be +shipped as part of Plone 4.1. Make sure you pin down plone.app.discussion to +version < 2.0 if installed as an add-on product (see install instructions below +for more details). Please report bugs to the `Plone bug tracker`_. .. _`Plone bug tracker`: http://dev.plone.org/plone/ +For the roadmap of the project see our `Pivotal Tracker`_. + +.. _`Pivotal Tracker`: http://www.pivotaltracker.com/projects/15135 + + Requirements ============ @@ -29,10 +35,15 @@ To install plone.app.discussion, add the following code to your buildout.cfg:: ... extends = ... - http://good-py.appspot.com/release/plone.app.discussion/1.0b12 + http://good-py.appspot.com/release/plone.app.discussion/1.0 ... + [versions] + plone.app.discussion < 2.0 + + ... + [instance] ... eggs = @@ -54,6 +65,7 @@ To install plone.app.discussion, add the following code to your buildout.cfg:: versions = versions [versions] + plone.app.discussion < 2.0 zope.schema = 3.6.4 ... diff --git a/docs/source/conf.py b/docs/source/conf.py index c60c355..0f65223 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -53,7 +53,7 @@ copyright = u'2010, Timo Stollenwerk - Plone Foundation' # The short X.Y version. version = '1.0' # The full version, including alpha/beta/rc tags. -release = '1.0RC1' +release = '1.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index abcb55d..88c9f3f 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ import sys from setuptools import setup, find_packages -version = '2.0RC1' +version = '2.0a1' install_requires = [ 'setuptools', From c1eab9c149888ad84b03e09643114761fc75373e Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 7 Feb 2011 15:08:24 +0000 Subject: [PATCH 12/22] Fix readme. svn path=/plone.app.discussion/trunk/; revision=47301 --- README.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 5c13cfb..e7add2f 100644 --- a/README.txt +++ b/README.txt @@ -40,7 +40,7 @@ To install plone.app.discussion, add the following code to your buildout.cfg:: ... [versions] - plone.app.discussion < 2.0 + plone.app.discussion = 1.0 ... @@ -65,7 +65,7 @@ To install plone.app.discussion, add the following code to your buildout.cfg:: versions = versions [versions] - plone.app.discussion < 2.0 + plone.app.discussion = 1.0 zope.schema = 3.6.4 ... From 533fefa396b7e8dc92681abd13840bfa2a49f42c Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 7 Feb 2011 15:15:56 +0000 Subject: [PATCH 13/22] Fix typo. svn path=/plone.app.discussion/trunk/; revision=47302 --- README.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index e7add2f..2e577f9 100644 --- a/README.txt +++ b/README.txt @@ -7,8 +7,8 @@ Stollenwerk (student) and Martin Aspeli (mentor). plone.app.discussion is an add-on product for Plone 3.3.x and 4.0.x and will be shipped as part of Plone 4.1. Make sure you pin down plone.app.discussion to -version < 2.0 if installed as an add-on product (see install instructions below -for more details). +versions < 2.0 if installed as an add-on product (see install instructions +below for more details). Please report bugs to the `Plone bug tracker`_. From bf96d0082f249e63783e9f2cbfc55488eb2e590d Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Tue, 8 Feb 2011 09:28:51 +0000 Subject: [PATCH 14/22] Remove "Plone 3 only" code; Do not monkey patch the BAD_TYPES vocabulary or plone.app.vocabularies anymore. svn path=/plone.app.discussion/trunk/; revision=47311 --- CHANGES.txt | 11 +++ plone/app/discussion/__init__.py | 14 +-- plone/app/discussion/browser/captcha.zcml | 15 ---- plone/app/discussion/browser/moderation.py | 20 ----- plone/app/discussion/comment.py | 87 +++++-------------- plone/app/discussion/conversation.py | 19 +--- plone/app/discussion/tests/test_comment.py | 16 +--- .../app/discussion/tests/test_conversation.py | 11 +-- .../discussion/tests/test_notifications.py | 10 +-- 9 files changed, 46 insertions(+), 157 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 212bc5b..3aaef4c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,17 @@ Changelog ========= +2.0a1 (unreleased) +------------------ + +- Remove "Plone 3 only" code. + [timo] + +- Do not monkey patch the BAD_TYPES vocabulary or plone.app.vocabularies + anymore. + [timo] + + 2.0a1 (2011-02-07) ------------------ diff --git a/plone/app/discussion/__init__.py b/plone/app/discussion/__init__.py index 2e973d9..11103ca 100644 --- a/plone/app/discussion/__init__.py +++ b/plone/app/discussion/__init__.py @@ -1,16 +1,4 @@ # -*- coding: utf-8 -*- from zope.i18nmessageid import MessageFactory -PloneAppDiscussionMessageFactory = MessageFactory('plone.app.discussion') - -# Monkey patch plone.app.vocabularies.types.BAD_TYPES and remove -# 'Discussion Item' from this tuple, so that Comments can be found -# in the search. This will become needless once plone.app.discussion -# will become a part of Plone 4. - -import plone.app.vocabularies.types - -new_bad_types = list(plone.app.vocabularies.types.BAD_TYPES) -if 'Discussion Item' in new_bad_types: - new_bad_types.remove('Discussion Item') -plone.app.vocabularies.types.BAD_TYPES = new_bad_types \ No newline at end of file +PloneAppDiscussionMessageFactory = MessageFactory('plone.app.discussion') \ No newline at end of file diff --git a/plone/app/discussion/browser/captcha.zcml b/plone/app/discussion/browser/captcha.zcml index 8c1f3d3..9acfddf 100644 --- a/plone/app/discussion/browser/captcha.zcml +++ b/plone/app/discussion/browser/captcha.zcml @@ -4,21 +4,6 @@ xmlns:zcml="http://namespaces.zope.org/zcml" i18n_domain="plone.app.discussion"> - - - - - - - - -