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

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

Changed method of defining of captcha type.

  • Property svn:eol-style set to native
File size: 673 bytes
RevLine 
[597]1from Products.CMFCore.utils import getToolByName
2
[659]3PROFILE = "profile-Products.qPloneGoogleSitemaps:default"
4
[597]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
[659]14        (ps.aq_base).__of__(self).runAllImportStepsFromProfile(PROFILE)
[597]15    else:
16        active_context_id = ps.getImportContextID()
[659]17        ps.setImportContext(PROFILE)
[597]18        ps.runAllImportSteps()
19        ps.setImportContext(active_context_id)
Note: See TracBrowser for help on using the repository browser.