first check if captcha is installed before we open browsers zcml files that depend on these packages, fixes #12118 and #12774

This commit is contained in:
maartenkling 2012-11-26 14:50:07 +01:00
parent 6dffe930f9
commit 412cfed5c5

View File

@ -18,6 +18,17 @@
<include file="notifications.zcml" /> <include file="notifications.zcml" />
<include file="subscribers.zcml" /> <include file="subscribers.zcml" />
<include file="upgrades.zcml" /> <include file="upgrades.zcml" />
<!-- load captch before browser -->
<configure zcml:condition="installed plone.formwidget.captcha">
<include package="plone.formwidget.captcha" />
</configure>
<configure zcml:condition="installed plone.formwidget.recaptcha">
<include package="plone.formwidget.recaptcha" />
</configure>
<configure zcml:condition="installed collective.z3cform.norobots">
<include package="collective.z3cform.norobots" />
</configure>
<include package=".browser" /> <include package=".browser" />
<i18n:registerTranslations directory="locales" /> <i18n:registerTranslations directory="locales" />
@ -81,14 +92,6 @@
name="plone.app.discussion.vocabularies.TextTransformVocabulary" name="plone.app.discussion.vocabularies.TextTransformVocabulary"
provides="zope.schema.interfaces.IVocabularyFactory" /> provides="zope.schema.interfaces.IVocabularyFactory" />
<configure zcml:condition="installed plone.formwidget.captcha">
<include package="plone.formwidget.captcha" />
</configure>
<configure zcml:condition="installed plone.formwidget.recaptcha">
<include package="plone.formwidget.recaptcha" />
</configure>
<!-- Conversation indexes --> <!-- Conversation indexes -->
<adapter name="total_comments" factory=".catalog.total_comments" /> <adapter name="total_comments" factory=".catalog.total_comments" />
<adapter name="last_comment_date" factory=".catalog.last_comment_date" /> <adapter name="last_comment_date" factory=".catalog.last_comment_date" />