plone.registry 1.0a2 changed methods to mixedCase (for_interface to forInterface).

svn path=/plone.app.discussion/trunk/; revision=28024
This commit is contained in:
Timo Stollenwerk 2009-07-12 19:13:42 +00:00
parent 39e0faffc9
commit b106262e31
4 changed files with 7 additions and 7 deletions

View File

@ -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):

View File

@ -45,7 +45,7 @@ class Utility(BrowserView):
settings = None
try:
settings = registry.for_interface(IDiscussionSettings)
settings = registry.forInterface(IDiscussionSettings)
except KeyError:
return False

View File

@ -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:

View File

@ -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)