Skip to content

Commit

Permalink
Merge pull request #167 from plone/cleanup-zcml-conditions
Browse files Browse the repository at this point in the history
Remove unnecessary zcml conditions
  • Loading branch information
davisagli authored Dec 11, 2024
2 parents 6e26cbf + 0d9fe86 commit 32d4a57
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 26 deletions.
1 change: 1 addition & 0 deletions news/167.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused ZCML conditions. @davisagli
17 changes: 7 additions & 10 deletions src/plone/volto/behaviors/configure.zcml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:plone="http://namespaces.plone.org/plone"
xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="plone.volto"
>

Expand All @@ -17,15 +16,13 @@
provides=".preview.IPreview"
/>

<configure zcml:condition="have plone-60">
<plone:behavior
name="volto.preview_image_link"
title="Preview Image Link"
description="Preview image for listings based on links"
provides=".preview_link.IPreviewLink"
/>
<adapter factory=".preview_link.PreviewImageScalesFieldAdapter" />
</configure>
<plone:behavior
name="volto.preview_image_link"
title="Preview Image Link"
description="Preview image for listings based on links"
provides=".preview_link.IPreviewLink"
/>
<adapter factory=".preview_link.PreviewImageScalesFieldAdapter" />

<plone:behavior
name="volto.navtitle"
Expand Down
5 changes: 0 additions & 5 deletions src/plone/volto/browser/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
allowed_attributes="breadcrumbs"
permission="zope.Public"
layer="plone.volto.interfaces.IPloneVoltoCoreLayer"
zcml:condition="have plone-5"
/>

<browser:page
Expand All @@ -29,7 +28,6 @@
allowed_attributes="topLevelTabs"
permission="zope.Public"
layer="plone.volto.interfaces.IPloneVoltoCoreLayer"
zcml:condition="have plone-5"
/>

<configure zcml:condition="installed requests">
Expand All @@ -39,7 +37,6 @@
class=".migrate_richtext.MigrateRichTextToVoltoBlocks"
template="migrate_richtext.pt"
permission="cmf.ManagePortal"
zcml:condition="have plone-60"
/>

<browser:page
Expand All @@ -48,7 +45,6 @@
class=".migrate_to_volto.MigrateToVolto"
template="migrate_to_volto.pt"
permission="cmf.ManagePortal"
zcml:condition="have plone-60"
/>
</configure>

Expand All @@ -59,7 +55,6 @@
template="voltobackendwarning.pt"
permission="zope2.View"
layer="plone.volto.interfaces.IPloneVoltoCoreLayer"
zcml:condition="have plone-60"
/>

</configure>
1 change: 0 additions & 1 deletion src/plone/volto/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:monkey="http://namespaces.plone.org/monkey"
xmlns:plone="http://namespaces.plone.org/plone"
xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="plone.volto"
>

Expand Down
5 changes: 1 addition & 4 deletions src/plone/volto/dependencies.zcml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:zcml="http://namespaces.zope.org/zcml"
>
<configure xmlns="http://namespaces.zope.org/zope">

<include
package="Products.GenericSetup"
Expand Down
5 changes: 1 addition & 4 deletions src/plone/volto/overrides.zcml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:zcml="http://namespaces.zope.org/zcml"
>
<configure xmlns="http://namespaces.zope.org/zope">

<utility
name="plone.app.vocabularies.Keywords"
Expand Down
2 changes: 0 additions & 2 deletions src/plone/volto/patches.zcml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:monkey="http://namespaces.plone.org/monkey"
xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="plone.volto"
>

Expand All @@ -20,7 +19,6 @@
class="Products.CMFPlone.browser.login.password_reset.PasswordResetToolView"
docstringWarning="True"
description="Patch password reset tool construct URL to cater for different frontend domain"
zcml:condition="have plone-52"
/>

</configure>

0 comments on commit 32d4a57

Please sign in to comment.