Removed the conditional loading of event subscribers:
- zope.app.container is available in both Plone 3 and Plone 4, so the 'not-installed zope.app.container' condition was always false - zope.lifecycleevent.interfaces does not have an IObjectAddedEvent or IObjectRemovedEvent so even if the condition would have been true, the loading would have failed. svn path=/plone.app.discussion/trunk/; revision=46367
This commit is contained in:
parent
a2a17085a3
commit
d90c436f8a
@ -3,41 +3,16 @@
|
|||||||
xmlns:zcml="http://namespaces.zope.org/zcml"
|
xmlns:zcml="http://namespaces.zope.org/zcml"
|
||||||
i18n_domain="plone.app.discussion">
|
i18n_domain="plone.app.discussion">
|
||||||
|
|
||||||
<!-- Plone 3 Event Subscribers -->
|
<subscriber
|
||||||
|
for="plone.app.discussion.interfaces.IComment
|
||||||
|
zope.app.container.interfaces.IObjectAddedEvent"
|
||||||
|
handler=".comment.notify_user"
|
||||||
|
/>
|
||||||
|
|
||||||
<configure zcml:condition="not-installed zope.app.container">
|
<subscriber
|
||||||
|
for="plone.app.discussion.interfaces.IComment
|
||||||
<subscriber
|
zope.app.container.interfaces.IObjectAddedEvent"
|
||||||
for="plone.app.discussion.interfaces.IComment
|
handler=".comment.notify_moderator"
|
||||||
zope.lifecycleevent.interfaces.IObjectAddedEvent"
|
/>
|
||||||
handler=".comment.notify_user"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<subscriber
|
|
||||||
for="plone.app.discussion.interfaces.IComment
|
|
||||||
zope.lifecycleevent.interfaces.IObjectAddedEvent"
|
|
||||||
handler=".comment.notify_moderator"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</configure>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Plone 4 Event Subscribers -->
|
|
||||||
|
|
||||||
<configure zcml:condition="installed zope.app.container">
|
|
||||||
|
|
||||||
<subscriber
|
|
||||||
for="plone.app.discussion.interfaces.IComment
|
|
||||||
zope.app.container.interfaces.IObjectAddedEvent"
|
|
||||||
handler=".comment.notify_user"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<subscriber
|
|
||||||
for="plone.app.discussion.interfaces.IComment
|
|
||||||
zope.app.container.interfaces.IObjectAddedEvent"
|
|
||||||
handler=".comment.notify_moderator"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</configure>
|
|
||||||
|
|
||||||
</configure>
|
</configure>
|
||||||
|
@ -3,89 +3,41 @@
|
|||||||
xmlns:zcml="http://namespaces.zope.org/zcml"
|
xmlns:zcml="http://namespaces.zope.org/zcml"
|
||||||
i18n_domain="plone.app.discussion">
|
i18n_domain="plone.app.discussion">
|
||||||
|
|
||||||
<!-- Plone 3 Event Subscribers -->
|
<subscriber
|
||||||
|
for="plone.app.discussion.interfaces.IComment
|
||||||
|
zope.app.container.interfaces.IObjectAddedEvent"
|
||||||
|
handler=".comment.notify_workflow"
|
||||||
|
/>
|
||||||
|
|
||||||
<configure zcml:condition="not-installed zope.app.container">
|
<subscriber
|
||||||
|
for="plone.app.discussion.interfaces.IComment
|
||||||
|
zope.app.container.interfaces.IObjectAddedEvent"
|
||||||
|
handler=".comment.notify_content_object"
|
||||||
|
/>
|
||||||
|
|
||||||
<subscriber
|
<subscriber
|
||||||
for="plone.app.discussion.interfaces.IComment
|
for="plone.app.discussion.interfaces.IComment
|
||||||
zope.lifecycleevent.interfaces.IObjectAddedEvent"
|
zope.app.container.interfaces.IObjectRemovedEvent"
|
||||||
handler=".comment.notify_workflow"
|
handler=".comment.notify_content_object"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<subscriber
|
<subscriber
|
||||||
for="plone.app.discussion.interfaces.IComment
|
for="plone.app.discussion.interfaces.IComment
|
||||||
zope.lifecycleevent.interfaces.IObjectAddedEvent"
|
zope.app.container.interfaces.IObjectAddedEvent"
|
||||||
handler=".comment.notify_content_object"
|
handler=".tool.index_object"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<subscriber
|
<subscriber
|
||||||
for="plone.app.discussion.interfaces.IComment
|
for="plone.app.discussion.interfaces.IComment
|
||||||
zope.lifecycleevent.interfaces.IObjectRemovedEvent"
|
zope.app.container.interfaces.IObjectRemovedEvent"
|
||||||
handler=".comment.notify_content_object"
|
handler=".tool.unindex_object"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<subscriber
|
<subscriber
|
||||||
for="plone.app.discussion.interfaces.IComment
|
for="Products.CMFCore.interfaces.IContentish
|
||||||
zope.lifecycleevent.interfaces.IObjectAddedEvent"
|
zope.app.container.interfaces.IObjectRemovedEvent"
|
||||||
handler=".tool.index_object"
|
handler=".comment.notify_content_object_deleted"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<subscriber
|
|
||||||
for="plone.app.discussion.interfaces.IComment
|
|
||||||
zope.lifecycleevent.interfaces.IObjectRemovedEvent"
|
|
||||||
handler=".tool.unindex_object"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<subscriber
|
|
||||||
for="Products.CMFCore.interfaces.IContentish
|
|
||||||
zope.lifecycleevent.interfaces.IObjectRemovedEvent"
|
|
||||||
handler=".comment.notify_content_object_deleted"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</configure>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Plone 4 Event Subscribers -->
|
|
||||||
|
|
||||||
<configure zcml:condition="installed zope.app.container">
|
|
||||||
|
|
||||||
<subscriber
|
|
||||||
for="plone.app.discussion.interfaces.IComment
|
|
||||||
zope.app.container.interfaces.IObjectAddedEvent"
|
|
||||||
handler=".comment.notify_workflow"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<subscriber
|
|
||||||
for="plone.app.discussion.interfaces.IComment
|
|
||||||
zope.app.container.interfaces.IObjectAddedEvent"
|
|
||||||
handler=".comment.notify_content_object"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<subscriber
|
|
||||||
for="plone.app.discussion.interfaces.IComment
|
|
||||||
zope.app.container.interfaces.IObjectRemovedEvent"
|
|
||||||
handler=".comment.notify_content_object"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<subscriber
|
|
||||||
for="plone.app.discussion.interfaces.IComment
|
|
||||||
zope.app.container.interfaces.IObjectAddedEvent"
|
|
||||||
handler=".tool.index_object"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<subscriber
|
|
||||||
for="plone.app.discussion.interfaces.IComment
|
|
||||||
zope.app.container.interfaces.IObjectRemovedEvent"
|
|
||||||
handler=".tool.unindex_object"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<subscriber
|
|
||||||
for="Products.CMFCore.interfaces.IContentish
|
|
||||||
zope.app.container.interfaces.IObjectRemovedEvent"
|
|
||||||
handler=".comment.notify_content_object_deleted"
|
|
||||||
/>
|
|
||||||
</configure>
|
|
||||||
|
|
||||||
<!-- Control panel event subscribers -->
|
<!-- Control panel event subscribers -->
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user