Move captcha registration to its own captcha.zcml file. Fix captcha registration for Plone 3/Zope 2.10

svn path=/plone.app.discussion/trunk/; revision=37140
This commit is contained in:
Timo Stollenwerk
2010-06-10 14:57:03 +00:00
parent 2767f52bf0
commit ac6865311d
3 changed files with 51 additions and 20 deletions
+3 -20
View File
@@ -1,11 +1,13 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:zcml="http://namespaces.zope.org/zcml"
xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="plone.app.discussion">
<include package="plone.app.registry" />
<include file="captcha.zcml" />
<!-- Traversal adapter -->
<adapter factory=".traversal.ConversationNamespace" name="conversation" />
@@ -81,25 +83,6 @@
permission="zope2.View"
/>
<!-- Comment form extender -->
<configure zcml:condition="have plone.app.discussion-captcha">
<!--
Register the Captcha form extender and validator only if there are
plugins installed that declare to implement a Captcha solution for
plone.app.discussion (e.g. plone.formwidget.captcha and
plone.formwidget.recaptcha).
-->
<adapter
factory=".captcha.Captcha"
provides="plone.app.discussion.interfaces.ICaptcha" />
<adapter
factory=".captcha.CaptchaExtender"
provides="plone.z3cform.fieldsets.interfaces.IFormExtender" />
<adapter
factory=".captcha.CaptchaValidator"
/>
</configure>
<!-- Comment view -->
<browser:view
name="view"