Ejemplo n.º 1
0
def v11(context):
    IUpgradeTool(context).runImportStep('collective.contact.core', 'typeinfo')
    IUpgradeTool(context).runImportStep('collective.contact.core',
                                        'plone.app.registry')
    val = api.portal.get_registry_record(name='person_contact_details_private',
                                         interface=IContactCoreParameters)
    if val is None:
        api.portal.set_registry_record(name='person_contact_details_private',
                                       value=True,
                                       interface=IContactCoreParameters)
Ejemplo n.º 2
0
def v5(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.widget:default')
    # add sortable_title column and reindex persons and organizations
    tool.addMetadata('sortable_title')
    tool.reindexContents(IContactContent, ('sortable_title',))
Ejemplo n.º 3
0
def v2(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.core.upgrades:v2')
    catalog = api.portal.get_tool(name='portal_catalog')
    catalog.clearFindAndRebuild()
    reindex_relations(context)
def v1101(context):
    """Upgrade to v1101"""
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contentrules.comingsoon.upgrades:v1101')
Ejemplo n.º 5
0
def v9(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.core.upgrades:v9')
def v2(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.facetednav.upgrades:v2')
Ejemplo n.º 7
0
def v6(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.core.upgrades:v6')
    tool.refreshResources()
Ejemplo n.º 8
0
def v2(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.core.upgrades:v2')
    catalog = api.portal.get_tool(name='portal_catalog')
    catalog.clearFindAndRebuild()
    reindex_relations(context)
Ejemplo n.º 9
0
def v4(context):
    IUpgradeTool(context).runImportStep('collective.contact.core', 'rolemap')
Ejemplo n.º 10
0
def v6(context):
    tool = IUpgradeTool(context)
    tool.runImportStep('review.rfsepolicy', 'contentrules')
    tool.runImportStep('review.rfsepolicy', 'workflow')
Ejemplo n.º 11
0
def v4(context):
    from plone.namedfile.file import NamedBlobFile
    tool = IUpgradeTool(context)
    tool.uninstallProduct('uwosh.northstar')
    tool.installProduct('plone.app.workflowmanager')
    tool.uninstallProduct('plone.app.versioningbehavior')
    tool.installProduct('plone.app.versioningbehavior')
    tool.runImportStep('review.rfsepolicy', 'typeinfo')
    tool.portal.portal_catalog.manage_catalogReindex(context.REQUEST, context.REQUEST.RESPONSE, '')
    if 'portal_subskinstool' in tool.portal:
        tool.portal.manage_delObjects(['portal_subskinstool'])

    for old_layer in ['collective_cmfeditionsdexteritycompat', 'archetypes_kss', 'plone_kss']:
        if old_layer in tool.portal.portal_skins:
            tool.portal.portal_skins.manage_delObjects([old_layer])

    # todo: remove inline validation

    def migrate_version_1(obj, path):
        if obj.version_1 is not None:
            return
        namedfile = obj.file
        namedblobfile = NamedBlobFile(namedfile.data._data,
                                      contentType=namedfile.contentType,
                                      filename=namedfile.filename)

        obj.version_1 = namedblobfile

    tool.migrateContent('article', migrate_version_1, nofail=True)

    def migrate_report_file(obj, path):
        if obj.file.__class__ is NamedBlobFile:
            return

        namedfile = obj.file
        namedblobfile = NamedBlobFile(namedfile.data._data,
                                      contentType=namedfile.contentType,
                                      filename=namedfile.filename)

        obj.file = namedblobfile

    tool.migrateContent('report', migrate_report_file, nofail=True)
def v1101(context):
    """Upgrade to v1101"""
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contentrules.comingsoon.upgrades:v1101')
Ejemplo n.º 13
0
def upgrade12(context):
    IUpgradeTool(context).refreshResources()
def v3(context):
    tool = IUpgradeTool(context)
    tool.runImportStep('collective.contact.facetednav', 'actions')
    tool.runImportStep('collective.contact.facetednav', 'jsregistry')
Ejemplo n.º 15
0
def v6(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.core.upgrades:v6')
    tool.refreshResources()
Ejemplo n.º 16
0
def v5(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.widget:default')
    # add sortable_title column and reindex persons and organizations
    tool.addMetadata('sortable_title')
    tool.reindexContents(IContactContent, ('sortable_title', ))
Ejemplo n.º 17
0
def v9(context):
    tool = IUpgradeTool(context)
    tool.runProfile('collective.contact.core.upgrades:v9')
def v4(context):
    tool = IUpgradeTool(context)
    tool.refreshResources()