Changeset 2020 in products


Ignore:
Timestamp:
Mar 29, 2010 5:46:53 PM (15 years ago)
Author:
mylan
Message:

#175: Fix required (quintagroup.captcha.core) package installation in Plone < v3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonecaptchas/branches/split2packs/quintagroup/plonecaptchas/Extensions/Install.py

    r963 r2020  
    11import transaction 
    22from Products.CMFCore.utils import getToolByName 
     3REQUIRED = 'quintagroup.captcha.core' 
     4 
     5def install(self): 
     6    qi = getToolByName(self, 'portal_quickinstaller') 
     7    # install required quintagroup.captcha.core product 
     8    # BBB: Need to success installation in Plone<3.1 
     9    #      (with GenericSetup < v1.4.2, where dependency 
     10    #       support was not yet implemented) 
     11    if not REQUIRED in qi.listInstalledProducts(): 
     12        qi.installProduct(REQUIRED) 
     13    # install plonecaptchas 
     14    gs = getToolByName(self, 'portal_setup') 
     15    gs.runAllImportStepsFromProfile('profile-quintagroup.plonecaptchas:default') 
     16    transaction.savepoint() 
    317 
    418def uninstall(self): 
Note: See TracChangeset for help on using the changeset viewer.