source: products/qPloneGoogleSitemaps/trunk/Extensions/Install.py

Last change on this file was 659, checked in by crchemist, 13 years ago

Changed method of defining of captcha type.

  • Property svn:eol-style set to native
File size: 673 bytes
Line 
1from Products.CMFCore.utils import getToolByName
2
3PROFILE = "profile-Products.qPloneGoogleSitemaps:default"
4
5def install(self, reinstall=False):
6    """ Install skin with GenericSetup install profile
7    """
8    ps = getToolByName(self, 'portal_setup')
9    mtool = getToolByName(self, 'portal_migration')
10    plone_version = mtool.getFileSystemVersion()
11
12    if plone_version.startswith('3'):
13        # if this is plone 3.x
14        (ps.aq_base).__of__(self).runAllImportStepsFromProfile(PROFILE)
15    else:
16        active_context_id = ps.getImportContextID()
17        ps.setImportContext(PROFILE)
18        ps.runAllImportSteps()
19        ps.setImportContext(active_context_id)
Note: See TracBrowser for help on using the repository browser.