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:
parent
1316cfc83e
commit
81dcdeaea3
@ -4,6 +4,10 @@ Changelog
|
|||||||
1.0b11 (unreleased)
|
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.
|
- Remove the too generic id attribute of the comment form.
|
||||||
[timo]
|
[timo]
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ class CaptchaExtender(extensible.FormExtender):
|
|||||||
self.form = form
|
self.form = form
|
||||||
|
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.forInterface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings, check=False)
|
||||||
self.captcha = settings.captcha
|
self.captcha = settings.captcha
|
||||||
portal_membership = getToolByName(self.context, 'portal_membership')
|
portal_membership = getToolByName(self.context, 'portal_membership')
|
||||||
self.isAnon = portal_membership.isAnonymousUser()
|
self.isAnon = portal_membership.isAnonymousUser()
|
||||||
|
@ -86,7 +86,7 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
|
|||||||
|
|
||||||
# XXX: Author notification code
|
# XXX: Author notification code
|
||||||
#registry = queryUtility(IRegistry)
|
#registry = queryUtility(IRegistry)
|
||||||
#settings = registry.forInterface(IDiscussionSettings)
|
#settings = registry.forInterface(IDiscussionSettings, check=False)
|
||||||
#if not settings.user_notification_enabled:
|
#if not settings.user_notification_enabled:
|
||||||
# self.widgets['author_notification'].mode = interfaces.HIDDEN_MODE
|
# 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
|
# Captcha check for anonymous users (if Captcha is enabled and
|
||||||
# anonymous commenting is allowed)
|
# anonymous commenting is allowed)
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.forInterface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings, check=False)
|
||||||
portal_membership = getToolByName(self.context, 'portal_membership')
|
portal_membership = getToolByName(self.context, 'portal_membership')
|
||||||
if settings.captcha != 'disabled' and \
|
if settings.captcha != 'disabled' and \
|
||||||
settings.anonymous_comments and \
|
settings.anonymous_comments and \
|
||||||
@ -239,7 +239,7 @@ class CommentsViewlet(ViewletBase):
|
|||||||
transforms = getToolByName(self, 'portal_transforms')
|
transforms = getToolByName(self, 'portal_transforms')
|
||||||
targetMimetype = 'text/html'
|
targetMimetype = 'text/html'
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.forInterface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings, check=False)
|
||||||
mimetype = settings.text_transform
|
mimetype = settings.text_transform
|
||||||
return transforms.convertTo(targetMimetype,
|
return transforms.convertTo(targetMimetype,
|
||||||
text,
|
text,
|
||||||
@ -346,7 +346,7 @@ class CommentsViewlet(ViewletBase):
|
|||||||
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.forInterface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings, check=False)
|
||||||
return settings.show_commenter_image
|
return settings.show_commenter_image
|
||||||
|
|
||||||
def is_anonymous(self):
|
def is_anonymous(self):
|
||||||
|
@ -46,7 +46,7 @@ class CaptchaValidator(validator.SimpleFieldValidator):
|
|||||||
super(CaptchaValidator, self).validate(value)
|
super(CaptchaValidator, self).validate(value)
|
||||||
|
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.forInterface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings, check=False)
|
||||||
|
|
||||||
if settings.captcha in ('captcha', 'recaptcha', 'norobots'):
|
if settings.captcha in ('captcha', 'recaptcha', 'norobots'):
|
||||||
captcha = getMultiAdapter((aq_inner(self.context), self.request),
|
captcha = getMultiAdapter((aq_inner(self.context), self.request),
|
||||||
|
@ -194,7 +194,7 @@ def notify_user(obj, event): # pragma: no cover
|
|||||||
|
|
||||||
# Check if user notification is enabled
|
# Check if user notification is enabled
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.forInterface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings, check=False)
|
||||||
if not settings.user_notification_enabled:
|
if not settings.user_notification_enabled:
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -238,7 +238,7 @@ def notify_moderator(obj, event):
|
|||||||
|
|
||||||
# Check if moderator notification is enabled
|
# Check if moderator notification is enabled
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.forInterface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings, check=False)
|
||||||
if not settings.moderator_notification_enabled:
|
if not settings.moderator_notification_enabled:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ class Conversation(Traversable, Persistent, Explicit):
|
|||||||
|
|
||||||
# Fetch discussion registry
|
# Fetch discussion registry
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.forInterface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings, check=False)
|
||||||
|
|
||||||
# Check if discussion is allowed globally
|
# Check if discussion is allowed globally
|
||||||
if not settings.globally_enabled:
|
if not settings.globally_enabled:
|
||||||
|
Loading…
Reference in New Issue
Block a user