-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into thet-staticresources
- Loading branch information
Showing
7 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# -*- coding: utf-8 -*- | ||
from Products.CMFCore.utils import getToolByName | ||
from plone.app.upgrade.utils import loadMigrationProfile | ||
|
||
import logging | ||
|
||
|
||
logger = logging.getLogger('plone.app.upgrade') | ||
|
||
|
||
def add_exclude_from_nav_index(context): | ||
"""Add exclude_from_nav index to the portal_catalog. | ||
""" | ||
name = 'exclude_from_nav' | ||
meta_type = 'BooleanIndex' | ||
catalog = getToolByName(context, 'portal_catalog') | ||
indexes = catalog.indexes() | ||
indexables = [] | ||
if name not in indexes: | ||
catalog.addIndex(name, meta_type) | ||
indexables.append(name) | ||
logger.info('Added %s for field %s.', meta_type, name) | ||
if len(indexables) > 0: | ||
logger.info('Indexing new indexes %s.', ', '.join(indexables)) | ||
catalog.manage_reindexIndex(ids=indexables) | ||
|
||
|
||
def to52beta1(context): | ||
loadMigrationProfile(context, 'profile-plone.app.upgrade.v52:to52beta1') | ||
add_exclude_from_nav_index(context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0"?> | ||
<registry> | ||
|
||
<records interface="Products.CMFPlone.interfaces.controlpanel.INavigationSchema" prefix="plone" purge="False"> | ||
<value key="navigation_depth">1</value> | ||
</records> | ||
|
||
</registry> |
File renamed without changes.