Skip to content

Commit

Permalink
Merge pull request #35 from plone/tomgross-nocmfdefault
Browse files Browse the repository at this point in the history
Provide cmfdefault stubs for migration old Plone sites
  • Loading branch information
tisto committed Jun 27, 2015
2 parents 40fc30b + 0bded19 commit 2cf8c76
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
15 changes: 14 additions & 1 deletion plone/app/upgrade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,19 @@ def getNonInstallableProducts(self):
from Products.ATContentTypes.tool import metadata
alias_module('Products.CMFPlone.MetadataTool', metadata)

try:
import Products.CMFDefault.MetadataTool
Products.CMFDefault.MetadataTool # pyflakes
except ImportError:
from Products.ATContentTypes.tool import metadata
sys.modules['Products.CMFDefault.MetadataTool'] = metadata

try:
import Products.CMFDefault.SyndicationInfo
Products.CMFDefault.SyndicationInfo # pyflakes
except ImportError:
sys.modules['Products.CMFDefault.SyndicationInfo'] = bbb

try:
from Products.PloneLanguageTool import interfaces
except ImportError:
Expand All @@ -130,4 +143,4 @@ def getNonInstallableProducts(self):
from Products.CMFPlacefulWorkflow.interfaces import portal_placeful_workflow
except:
from Products.CMFPlacefulWorkflow import interfaces
alias_module('Products.CMFPlacefulWorkflow.interfaces.portal_placeful_workflow', interfaces)
alias_module('Products.CMFPlacefulWorkflow.interfaces.portal_placeful_workflow', interfaces)
5 changes: 5 additions & 0 deletions plone/app/upgrade/bbb.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,8 @@ def removeActionIcon(self, category, action_id):
icons.remove(icon)
del self._lookup[(category, action_id)]
self._icons = tuple(icons)

# BBB from CMFDefault
class SyndicationInformation(SimpleItem):
id='syndication_information'
meta_type='SyndicationInformation'

0 comments on commit 2cf8c76

Please sign in to comment.