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
This commit is contained in:
Timo Stollenwerk 2010-10-29 10:43:46 +00:00
parent 1316cfc83e
commit 81dcdeaea3
6 changed files with 13 additions and 9 deletions

View File

@ -4,6 +4,10 @@ Changelog
1.0b11 (unreleased)
-------------------
- 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.
[timo]
- Remove the too generic id attribute of the comment form.
[timo]

View File

@ -52,7 +52,7 @@ class CaptchaExtender(extensible.FormExtender):
self.form = form
registry = queryUtility(IRegistry)
settings = registry.forInterface(IDiscussionSettings)
settings = registry.forInterface(IDiscussionSettings, check=False)
self.captcha = settings.captcha
portal_membership = getToolByName(self.context, 'portal_membership')
self.isAnon = portal_membership.isAnonymousUser()

View File

@ -86,7 +86,7 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
# XXX: Author notification code
#registry = queryUtility(IRegistry)
#settings = registry.forInterface(IDiscussionSettings)
#settings = registry.forInterface(IDiscussionSettings, check=False)
#if not settings.user_notification_enabled:
# self.widgets['author_notification'].mode = interfaces.HIDDEN_MODE
@ -114,7 +114,7 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
# Captcha check for anonymous users (if Captcha is enabled and
# anonymous commenting is allowed)
registry = queryUtility(IRegistry)
settings = registry.forInterface(IDiscussionSettings)
settings = registry.forInterface(IDiscussionSettings, check=False)
portal_membership = getToolByName(self.context, 'portal_membership')
if settings.captcha != 'disabled' and \
settings.anonymous_comments and \
@ -239,7 +239,7 @@ class CommentsViewlet(ViewletBase):
transforms = getToolByName(self, 'portal_transforms')
targetMimetype = 'text/html'
registry = queryUtility(IRegistry)
settings = registry.forInterface(IDiscussionSettings)
settings = registry.forInterface(IDiscussionSettings, check=False)
mimetype = settings.text_transform
return transforms.convertTo(targetMimetype,
text,
@ -346,7 +346,7 @@ class CommentsViewlet(ViewletBase):
def show_commenter_image(self):
# Check if showing commenter image is enabled in the registry
registry = queryUtility(IRegistry)
settings = registry.forInterface(IDiscussionSettings)
settings = registry.forInterface(IDiscussionSettings, check=False)
return settings.show_commenter_image
def is_anonymous(self):

View File

@ -46,7 +46,7 @@ class CaptchaValidator(validator.SimpleFieldValidator):
super(CaptchaValidator, self).validate(value)
registry = queryUtility(IRegistry)
settings = registry.forInterface(IDiscussionSettings)
settings = registry.forInterface(IDiscussionSettings, check=False)
if settings.captcha in ('captcha', 'recaptcha', 'norobots'):
captcha = getMultiAdapter((aq_inner(self.context), self.request),

View File

@ -194,7 +194,7 @@ def notify_user(obj, event): # pragma: no cover
# Check if user notification is enabled
registry = queryUtility(IRegistry)
settings = registry.forInterface(IDiscussionSettings)
settings = registry.forInterface(IDiscussionSettings, check=False)
if not settings.user_notification_enabled:
return
@ -238,7 +238,7 @@ def notify_moderator(obj, event):
# Check if moderator notification is enabled
registry = queryUtility(IRegistry)
settings = registry.forInterface(IDiscussionSettings)
settings = registry.forInterface(IDiscussionSettings, check=False)
if not settings.moderator_notification_enabled:
return

View File

@ -100,7 +100,7 @@ class Conversation(Traversable, Persistent, Explicit):
# Fetch discussion registry
registry = queryUtility(IRegistry)
settings = registry.forInterface(IDiscussionSettings)
settings = registry.forInterface(IDiscussionSettings, check=False)
# Check if discussion is allowed globally
if not settings.globally_enabled: