remove unnecessary imports / variables; whitespace
svn path=/plone.app.discussion/trunk/; revision=37767
This commit is contained in:
parent
66c235aa5e
commit
cfdd99b111
@ -1,7 +1,4 @@
|
|||||||
from Products.Five.browser import BrowserView
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from zope.component import queryUtility
|
|
||||||
from plone.registry.interfaces import IRegistry
|
|
||||||
|
|
||||||
from plone.app.registry.browser import controlpanel
|
from plone.app.registry.browser import controlpanel
|
||||||
|
|
||||||
|
@ -47,8 +47,6 @@ class CaptchaValidator(validator.SimpleFieldValidator):
|
|||||||
def validate(self, value):
|
def validate(self, value):
|
||||||
super(CaptchaValidator, self).validate(value)
|
super(CaptchaValidator, self).validate(value)
|
||||||
|
|
||||||
data = self.request.form
|
|
||||||
|
|
||||||
registry = queryUtility(IRegistry)
|
registry = queryUtility(IRegistry)
|
||||||
settings = registry.forInterface(IDiscussionSettings)
|
settings = registry.forInterface(IDiscussionSettings)
|
||||||
|
|
||||||
@ -56,7 +54,7 @@ class CaptchaValidator(validator.SimpleFieldValidator):
|
|||||||
captcha = getMultiAdapter((aq_inner(self.context), self.request),
|
captcha = getMultiAdapter((aq_inner(self.context), self.request),
|
||||||
name=settings.captcha)
|
name=settings.captcha)
|
||||||
if not captcha.verify(input=value):
|
if not captcha.verify(input=value):
|
||||||
raise WrongCaptchaCode
|
raise WrongCaptchaCode
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user