Navigation Menu

Skip to content

Commit

Permalink
Removed separate registry profile.
Browse files Browse the repository at this point in the history
This was only needed for compatibility with Plone 4.1 and lower.
Moved `registry.xml` to the default profile.
  • Loading branch information
mauritsvanrees committed Feb 22, 2016
1 parent bed16c2 commit 9a42564
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Expand Up @@ -7,6 +7,10 @@ History of feedfeeder

- Compatible with Plone 4.3 and 5.0. [maurits]

- Removed separate registry profile that was only needed for
compatibility with Plone 4.1 and lower. Moved ``registry.xml`` to
the default profile. [maurits]

- Disabled CSRF protection on our update/clean feed views. Otherwise
you would have to add
``?_authenticator=user_specific_authentication_string`` to the urls
Expand Down
4 changes: 0 additions & 4 deletions Products/feedfeeder/profiles/registry/metadata.xml

This file was deleted.

15 changes: 2 additions & 13 deletions Products/feedfeeder/setuphandlers.py
Expand Up @@ -2,10 +2,6 @@

# The default profile id of your package:
PROFILE_ID = 'profile-Products.feedfeeder:default'
# The profile id for the registry. Done because on Plone 4.1 you get
# an ImportError when trying to store a value for
# plone.app.querystring.
REGISTRY_PROFILE_ID = 'profile-Products.feedfeeder:registry'


def update_types(context):
Expand All @@ -23,14 +19,8 @@ def update_rolemap(context):
def update_registry(context):
# context could be portal_setup or the Plone Site.
portal_setup = getToolByName(context, 'portal_setup')
try:
portal_setup.runImportStepFromProfile(
REGISTRY_PROFILE_ID, 'plone.app.registry')
except (ValueError, ImportError):
# Probably Plone 4.0, which has no plone.app.registry, or
# Plone 4.1, which has no plone.app.querystring. None of
# these two actually needs the registry settings in that case.
pass
portal_setup.runImportStepFromProfile(
PROFILE_ID, 'plone.app.registry')


def add_indexes(site, logger):
Expand Down Expand Up @@ -61,5 +51,4 @@ def importVarious(context):
logger = context.getLogger('feedfeeder')
site = context.getSite()
add_indexes(site, logger)
update_registry(site)
logger.info('feedfeeder_various step imported')

0 comments on commit 9a42564

Please sign in to comment.