Changeset 1810 in products


Ignore:
Timestamp:
Feb 23, 2010 12:37:56 PM (14 years ago)
Author:
liebster
Message:

Fixes old versions bug: Change of content type's domain to 'plone'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/setuphandlers.py

    r1785 r1810  
    44 
    55logger = logging.getLogger('quintagroup.seoptimizer') 
     6FIX_PTYPES_DOMAIN = ['Document', 'File', 'News Item'] 
    67 
    78def migrationActions(site): 
     
    5657            logger.log(logging.INFO, "Unregistered \"%s\" configlet." % id) 
    5758 
     59def changeDomain(site): 
     60    """ Fixes old versions bug: Change of content type's domain to 'plone'. 
     61    """ 
     62    for ptype in [ptypes for ptypes in site.portal_types.objectValues() if ptypes.id in FIX_PTYPES_DOMAIN]: 
     63        if ptype.i18n_domain == 'quintagroup.seoptimizer': 
     64            ptype.i18n_domain = 'plone' 
     65            logger.log(logging.INFO, "I18n Domain of the type \'%s\' changed to \'plone\'." % ptype.id) 
     66 
    5867def importVarious(context): 
    5968    """ Do customized installation. 
     
    6978    site = context.getSite() 
    7079    migrationActions(site) 
     80    changeDomain(site) 
    7181 
    7282def uninstall(context): 
Note: See TracChangeset for help on using the changeset viewer.