From 7ef2672e5c17e27e0e806d24fa441175523d6b67 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sat, 17 Oct 2009 14:13:27 +0000 Subject: [PATCH] Making captcha validator only adapt for the appropriate browser layer. This fixes the captcha error issue when p.a.d is in a deployment but not installed yet. evilbungle branch merge. svn path=/plone.app.discussion/trunk/; revision=30667 --- plone/app/discussion/browser/validator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plone/app/discussion/browser/validator.py b/plone/app/discussion/browser/validator.py index 891c191..65a5408 100644 --- a/plone/app/discussion/browser/validator.py +++ b/plone/app/discussion/browser/validator.py @@ -16,7 +16,11 @@ from zope.schema import ValidationError from plone.registry.interfaces import IRegistry -from plone.app.discussion.interfaces import IDiscussionSettings, IDiscussionLayer +from plone.app.discussion.interfaces import IDiscussionSettings, IDiscussionLayer, MessageFactory as _ + +from zope.interface import implements, Interface +from zope.schema.interfaces import IField +from zope.component import adapts try: from plone.formwidget.captcha import CaptchaMessageFactory as _