From b106262e312e292589d9b588075b4be5862f034c Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sun, 12 Jul 2009 19:13:42 +0000 Subject: [PATCH] plone.registry 1.0a2 changed methods to mixedCase (for_interface to forInterface). svn path=/plone.app.discussion/trunk/; revision=28024 --- plone/app/discussion/browser/comments.py | 4 ++-- plone/app/discussion/browser/controlpanel.py | 2 +- plone/app/discussion/conversation.py | 2 +- plone/app/discussion/tests/test_conversation.py | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index 480baf1..6f38495 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -111,13 +111,13 @@ class CommentsViewlet(ViewletBase): def anonymous_discussion_allowed(self): # Check if anonymous comments are allowed in the registry registry = queryUtility(IRegistry) - settings = registry.for_interface(IDiscussionSettings) + settings = registry.forInterface(IDiscussionSettings) return settings.anonymous_comments def show_commenter_image(self): # Check if showing commenter image is enabled in the registry registry = queryUtility(IRegistry) - settings = registry.for_interface(IDiscussionSettings) + settings = registry.forInterface(IDiscussionSettings) return settings.show_commenter_image def is_anonymous(self): diff --git a/plone/app/discussion/browser/controlpanel.py b/plone/app/discussion/browser/controlpanel.py index 935cf84..e692cb3 100644 --- a/plone/app/discussion/browser/controlpanel.py +++ b/plone/app/discussion/browser/controlpanel.py @@ -45,7 +45,7 @@ class Utility(BrowserView): settings = None try: - settings = registry.for_interface(IDiscussionSettings) + settings = registry.forInterface(IDiscussionSettings) except KeyError: return False diff --git a/plone/app/discussion/conversation.py b/plone/app/discussion/conversation.py index a02a8a9..de4d156 100644 --- a/plone/app/discussion/conversation.py +++ b/plone/app/discussion/conversation.py @@ -96,7 +96,7 @@ class Conversation(Traversable, Persistent, Explicit): # Fetch discussion registry registry = queryUtility(IRegistry) - settings = registry.for_interface(IDiscussionSettings) + settings = registry.forInterface(IDiscussionSettings) # Check if discussion is allowed globally if not settings.globally_enabled: diff --git a/plone/app/discussion/tests/test_conversation.py b/plone/app/discussion/tests/test_conversation.py index e5f6c27..d145253 100644 --- a/plone/app/discussion/tests/test_conversation.py +++ b/plone/app/discussion/tests/test_conversation.py @@ -219,7 +219,7 @@ class ConversationTest(PloneTestCase): # Disable commenting in the registry registry = queryUtility(IRegistry) - settings = registry.for_interface(IDiscussionSettings) + settings = registry.forInterface(IDiscussionSettings) settings.globally_enabled = False # Check if commenting is disabled on the conversation @@ -247,7 +247,7 @@ class ConversationTest(PloneTestCase): # Disable commenting in the registry registry = queryUtility(IRegistry) - settings = registry.for_interface(IDiscussionSettings) + settings = registry.forInterface(IDiscussionSettings) settings.globally_enabled = False # Check if commenting is disabled on the conversation @@ -337,7 +337,7 @@ class ConversationTest(PloneTestCase): # Allow discussion on a single content object registry = queryUtility(IRegistry) - settings = registry.for_interface(IDiscussionSettings) + settings = registry.forInterface(IDiscussionSettings) # Create a conversation. conversation = IConversation(self.portal.doc1)