Commit Graph

85 Commits

Author SHA1 Message Date
Jens W. Klein 75c6a5dcc1 find -name "*.py" -exec pyupgrade --py3-only --py37-plus {} + 2022-05-01 23:14:41 +02:00
Jens W. Klein 34b758f2bd black 2022-05-01 23:14:09 +02:00
Philip Bauer 95861b28d5 fix tests with py3 2018-09-18 15:13:38 +02:00
Philip Bauer a8f2db58ff fix commenting in py3 2018-09-18 15:13:38 +02:00
Markus Hilbert 3c36af8ebc Fixed tests when IRichText behavior is used. 2018-07-11 12:35:46 +02:00
Jens W. Klein 58711579c4 isort 2018-06-15 10:22:11 +02:00
Philip Bauer 93a227c80d Add Python 2 / 3 compatibility 2018-01-25 13:04:11 +01:00
Katja Süss b08852baa0 some code-analysis reclamations fixed.
code-analysis OK up to: T100, S100, S101, C815, C812
2017-07-29 11:35:15 +02:00
Katja Süss 78abff152d Test 2017-07-28 19:12:49 +00:00
Gil Forcada d5e7afcd23 Use zope.interface decorator
This not only makes code more pleasent to read,
but also makes the code python 3 compatible
(while maintaining python 2 compatibility).
2016-07-08 23:17:03 +02:00
Gil Forcada cb1bf28c16 Cleanup
Follow https://github.com/plone/jenkins.plone.org/blob/master/docs/source/run-qa-on-package.rst
to clean up the code.
2016-02-05 09:43:42 +01:00
Fred van Dijk fcb4bbf94b Get rid of the monkey patch on Products.CMFPlone's CatalogTool. 2016-01-25 14:45:59 +01:00
Philip Bauer 0b0258867d Fix editing comments in Plone 5 2015-09-13 18:31:38 +02:00
Gil Forcada 0ade2c4329 'X not in Y' is recommended 2015-05-03 08:25:08 +02:00
Gil Forcada d5b5b1c2cd Fix total_comments indexer
"@property removes Acquisition wrappers from 'self'.
I don't remember why exactly (some implementation detail of Acquisition),
but it's a fact of life."

Quote from @davisagli on
https://github.com/plone/plone.app.discussion/pull/58

In short: removing the @property from total_comments fix the problem.
2015-02-16 11:31:47 +01:00
Gil Forcada 535af3aace Count acquisition wrapped comments
If the View permission is not set directly on the workflow,
but instead is left to be acquired,
total_comments will always return 0.
2015-02-16 11:28:49 +01:00
Gil Forcada b4c1d9e42d Sort imports
As per the styleguide
2015-02-16 10:22:09 +01:00
Timo Stollenwerk 2b18d5a2e4 Revert "Merge pull request #38 from delib/evilbungle-comment-acquisition"
This reverts commit e18598e316, reversing
changes made to fd6ac0788b.

This pull request introduces two test failures. See http://jenkins.plone.org/job/plone-5.0-python-2.7/lastCompletedBuild/testReport/ for details.
2014-05-13 07:07:37 +02:00
Alan Hoey 8161dc14da Fixing test failures. 2013-11-25 12:54:49 +00:00
Alan Hoey 4be4c03c49 Fix total comments index 2013-11-21 18:13:31 +00:00
Jens W. Klein 645bbb0a95 typo: renamed 'annotions' to 'annotations' 2013-08-26 14:49:26 +02:00
Timo Stollenwerk 73d84a22d7 Pep8. 2013-04-18 16:12:00 +02:00
Patrick Gerken 05f0e7e4d8 Many updates to handle non public comments properly 2013-03-28 14:28:22 +01:00
Kees Hink 6bd31ad490 Make conversation view not break when comment-id cannot be converted to long, fixes #13327 2012-11-14 13:25:10 +01:00
Timo Stollenwerk 19a511f4e5 Merge pull request #7 from plone/hide-from-breadcrumb
Hide Conversation objects from breadcrumb navigation
2012-07-12 06:18:42 -07:00
Paul J Stevens 53428fe5f6 total_comments only counts published comments
Also migrate workflow state during migration.
2012-06-13 11:17:22 +00:00
Gaudenz Steinlin ad5cca6454 Hide Conversation objects from breadcrumb navigation
The breadcrumbs navigation is also used in the search results view.
This lead to Conversation objects showing up if 'Discussion Items'
are searchable.
2012-05-29 13:40:31 +02:00
tisto a3883d7e7b Pep8 2012-01-14 07:13:39 +01:00
Timo Stollenwerk 5045960281 Make sure the conversation.getComments method returns acquisition wrapped comments.
svn path=/plone.app.discussion/trunk/; revision=51639
2011-08-18 06:39:25 +00:00
Ross Patterson 3708429a37 Move some policy out of the conversation storage adapter into a view,
specifically "enabled()".  Prevents having to replace/migrate
persistent objects to change policy which really only concerns the
context and possibly the request, not the conversation storage. Fixes
#11372.

svn path=/plone.app.discussion/trunk/; revision=48849
2011-04-15 04:29:46 +00:00
Ross Patterson d3025fb3ec Fix some aq wrapper errors introduced by my previous fix but not
exposed since the functional tests weren't running.

svn path=/plone.app.discussion/trunk/; revision=48836
2011-04-14 19:06:24 +00:00
Ross Patterson 586cd1fdb7 Don't add the annotation unless a comment is actually being added.
Fixes #11370.

svn path=/plone.app.discussion/trunk/; revision=48829
2011-04-14 16:17:29 +00:00
Timo Stollenwerk bf96d0082f 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
2011-02-08 09:28:51 +00:00
Maurits van Rees a2a17085a3 Nuke trailing white space
svn path=/plone.app.discussion/trunk/; revision=46366
2010-12-15 23:52:56 +00:00
Timo Stollenwerk ea2038b122 Remove XXX line from conversation.py. Martin and I agree that this is probably not relevant anymore. Refs #9288
svn path=/plone.app.discussion/trunk/; revision=46265
2010-12-12 12:51:41 +00:00
Timo Stollenwerk 3b31ac1602 Always import ObjectCreatedEvent from zope.lifecycleevent.
svn path=/plone.app.discussion/trunk/; revision=46006
2010-11-28 12:01:27 +00:00
Timo Stollenwerk ac4a64f55d Make sure comment UIDs in the catalog are always unique. This fixes
http://dev.plone.org/plone/ticket/10652. We depend on plone.uuid and plone.app.uuid now. Refs #10652.

svn path=/plone.app.discussion/trunk/; revision=46005
2010-11-28 11:39:19 +00:00
Timo Stollenwerk 81dcdeaea3 Disable the plone.app.registry check on schema elements, so no error is raised on upgrades. This fixes https://dev.plone.org/plone/ticket/11195. Refs #11195
svn path=/plone.app.discussion/trunk/; revision=40868
2010-10-29 10:43:46 +00:00
Timo Stollenwerk 138942470c Make sure the __parent__ pointer (the conversation) of a comment is not acquisition wrapped in conversation.addComment. This fixes Refs #11157.
svn path=/plone.app.discussion/trunk/; revision=40374
2010-09-28 10:37:40 +00:00
Timo Stollenwerk aeabd6fc11 Ignore certain lines for code coverage.
svn path=/plone.app.discussion/trunk/; revision=40081
2010-09-20 10:02:07 +00:00
Timo Stollenwerk 5f5b831904 Be more specific, use ImportError.
svn path=/plone.app.discussion/trunk/; revision=39270
2010-08-28 16:08:36 +00:00
Vincent Fretin 352a517a0a Fixed the case where a folder has allow_discussion=False and
conversation.enabled() on a document in this folder returned False
instead of True because of allow_discussion acquisition.

svn path=/plone.app.discussion/trunk/; revision=38835
2010-08-20 11:52:05 +00:00
Timo Stollenwerk cac0bae7a5 revert r37751.
svn path=/plone.app.discussion/trunk/; revision=37752
2010-07-12 13:47:53 +00:00
Timo Stollenwerk eabf3bc890 Always use zope.component getUtility instead of queryUtility.
svn path=/plone.app.discussion/trunk/; revision=37751
2010-07-12 13:34:02 +00:00
Hanno Schlichting 9d396e43f1 Protect against missing canonical in conversationCanonicalAdapterFactory.
svn path=/plone.app.discussion/trunk/; revision=37410
2010-06-25 17:16:15 +00:00
Hanno Schlichting 405ecc1268 Added an optional conversationCanonicalAdapterFactory showing how to share comments across all translations with LinguaPlone, by storing and retrieving the conversation from the canonical object.
svn path=/plone.app.discussion/trunk/; revision=33546
2010-01-28 13:44:56 +00:00
Hanno Schlichting faf339bec5 Optimized the conversation enabled method and avoid overlong lines
svn path=/plone.app.discussion/trunk/; revision=33514
2010-01-27 17:11:55 +00:00
Hanno Schlichting 9f4129a65f Respect the allow_comments field on an object and avoid calculations if no comments should be shown.
svn path=/plone.app.discussion/trunk/; revision=33511
2010-01-27 17:00:58 +00:00
Timo Stollenwerk 78d547daa6 Replacing infinite-recursion happy traverse_parent_folders method with one based on aq_chain; evilbungle branch merge.
svn path=/plone.app.discussion/trunk/; revision=30660
2009-10-17 09:33:58 +00:00
Timo Stollenwerk e5f1a70de6 Make unit tests pass with Plone 3.3 again. Migration tests still failing.
svn path=/plone.app.discussion/trunk/; revision=30633
2009-10-16 12:11:58 +00:00