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:
parent
39e0faffc9
commit
b106262e31
@ -111,13 +111,13 @@ class CommentsViewlet(ViewletBase):
|
|||||||
def anonymous_discussion_allowed(self):
|
def anonymous_discussion_allowed(self):
|
||||||
# Check if anonymous comments are allowed in the registry
|
# Check if anonymous comments are allowed in the registry
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.for_interface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings)
|
||||||
return settings.anonymous_comments
|
return settings.anonymous_comments
|
||||||
|
|
||||||
def show_commenter_image(self):
|
def show_commenter_image(self):
|
||||||
# Check if showing commenter image is enabled in the registry
|
# Check if showing commenter image is enabled in the registry
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.for_interface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings)
|
||||||
return settings.show_commenter_image
|
return settings.show_commenter_image
|
||||||
|
|
||||||
def is_anonymous(self):
|
def is_anonymous(self):
|
||||||
|
@ -45,7 +45,7 @@ class Utility(BrowserView):
|
|||||||
|
|
||||||
settings = None
|
settings = None
|
||||||
try:
|
try:
|
||||||
settings = registry.for_interface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ class Conversation(Traversable, Persistent, Explicit):
|
|||||||
|
|
||||||
# Fetch discussion registry
|
# Fetch discussion registry
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.for_interface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings)
|
||||||
|
|
||||||
# Check if discussion is allowed globally
|
# Check if discussion is allowed globally
|
||||||
if not settings.globally_enabled:
|
if not settings.globally_enabled:
|
||||||
|
@ -219,7 +219,7 @@ class ConversationTest(PloneTestCase):
|
|||||||
|
|
||||||
# Disable commenting in the registry
|
# Disable commenting in the registry
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.for_interface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings)
|
||||||
settings.globally_enabled = False
|
settings.globally_enabled = False
|
||||||
|
|
||||||
# Check if commenting is disabled on the conversation
|
# Check if commenting is disabled on the conversation
|
||||||
@ -247,7 +247,7 @@ class ConversationTest(PloneTestCase):
|
|||||||
|
|
||||||
# Disable commenting in the registry
|
# Disable commenting in the registry
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.for_interface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings)
|
||||||
settings.globally_enabled = False
|
settings.globally_enabled = False
|
||||||
|
|
||||||
# Check if commenting is disabled on the conversation
|
# Check if commenting is disabled on the conversation
|
||||||
@ -337,7 +337,7 @@ class ConversationTest(PloneTestCase):
|
|||||||
# Allow discussion on a single content object
|
# Allow discussion on a single content object
|
||||||
|
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.for_interface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings)
|
||||||
|
|
||||||
# Create a conversation.
|
# Create a conversation.
|
||||||
conversation = IConversation(self.portal.doc1)
|
conversation = IConversation(self.portal.doc1)
|
||||||
|
Loading…
Reference in New Issue
Block a user