source: products/qPloneGoogleSitemaps/tags/0.8.2/Extensions/Install.py

Last change on this file was 598, checked in by chervol, 17 years ago

globals added to DaySearch?

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