Skip to content

Commit

Permalink
Merge pull request #61 from plone/configuration-changed-event
Browse files Browse the repository at this point in the history
Remove ConfigurationChangedEvent.
  • Loading branch information
tisto committed Jun 2, 2015
2 parents 6273664 + db9cad1 commit ba1c1e2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 26 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
3.0.3 (unreleased)
------------------

- Remove ConfigurationChangedEvent. Import from new location to keep bbb.
[timo]

- Remove RAM control panel (has been moved to p.a.caching).
[timo]

Expand Down
2 changes: 0 additions & 2 deletions plone/app/controlpanel/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@

<include file="permissions.zcml" />

<subscriber handler=".events.handleConfigurationChangedEvent" />

</configure>
26 changes: 5 additions & 21 deletions plone/app/controlpanel/events.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
from zope.component import adapter
from zope.component import queryUtility
from zope.interface import implements
from zope.ramcache.interfaces.ram import IRAMCache

from plone.app.controlpanel.interfaces import IConfigurationChangedEvent


class ConfigurationChangedEvent(object):
implements(IConfigurationChangedEvent)

def __init__(self, context, data):
self.context = context
self.data = data


@adapter(IConfigurationChangedEvent)
def handleConfigurationChangedEvent(event):
util = queryUtility(IRAMCache)
if util is not None:
util.invalidateAll()
# Control panels for Plone 5 have been moved to CMFPlone. We keep those imports
# for backwards compatibility.
from Products.CMFPlone.interfaces import IConfigurationChangedEvent # noqa
from Products.CMFPlone.controlpanel.event import ConfigurationChangedEvent # noqa
from Products.CMFPlone.controlpanel.event import handleConfigurationChangedEvent # noqa
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
zip_safe=False,
install_requires=[
'setuptools',
'zope.component',
'zope.interface',
'zope.ramcache',
'Products.CMFPlone',
],
extras_require={
Expand Down

0 comments on commit ba1c1e2

Please sign in to comment.