Ejemplo n.º 1
0
def importVarious(context):
    """
    Import various settings.

    Provisional handler that does initialization that is not yet taken
    care of by other handlers.
    """
    # Only run step if a flag file is present
    if context.readDataFile('cmfeditions_various.txt') is None:
        return
    site = context.getSite()
    portal_modifier = getToolByName(site, 'portal_modifier', None)
    if portal_modifier is None:
        return
    StandardModifiers.install(portal_modifier)
    portal_repository = getToolByName(site, 'portal_repository')
    portal_repository.setAutoApplyMode(True)
    portal_repository._migrateVersionPolicies()
Ejemplo n.º 2
0
def importVarious(context):
    """
    Import various settings.

    Provisional handler that does initialization that is not yet taken
    care of by other handlers.
    """
    # Only run step if a flag file is present
    if context.readDataFile('cmfeditions_various.txt') is None:
        return
    site = context.getSite()
    portal_modifier = getToolByName(site, 'portal_modifier')
    StandardModifiers.install(portal_modifier)
    portal_repository = getToolByName(site, 'portal_repository')
    portal_repository.setAutoApplyMode(True)
    portal_repository.setVersionableContentTypes(VERSIONING_ACTIONS.keys())
    portal_repository._migrateVersionPolicies()
    portal_repository.manage_changePolicyDefs(ADD_POLICIES)
    for ctype in VERSIONING_ACTIONS:
        for policy_id in DEFAULT_POLICIES:
            portal_repository.addPolicyForContentType(ctype, policy_id)
Ejemplo n.º 3
0
def initialize(context):
    utils.ToolInit(meta_type='CMF Editions Tool', tools=tools,
                   icon='tool.gif').initialize(context)

    # initialize standard modifiers to make them addable through the ZMI
    StandardModifiers.initialize(context)
Ejemplo n.º 4
0
def installSkipRegistryBasesPointersModifier(context):
    """Upgrade step to install the component registry bases modifier."""
    portal_modifier = getToolByName(context, 'portal_modifier', None)
    StandardModifiers.install(portal_modifier, ['SkipRegistryBasesPointers'])
Ejemplo n.º 5
0
def initialize(context):
    utils.ToolInit(meta_type='CMF Editions Tool', tools=tools,
                   icon='tool.gif').initialize(context)

    # initialize standard modifiers to make them addable through the ZMI
    StandardModifiers.initialize(context)