Back to index

plone3  3.1.7
rcs.py
Go to the documentation of this file.
00001 from Products.CMFCore.utils import getToolByName
00002 
00003 from Products.CMFPlone.migrations.v3_0.alphas import enableZope3Site
00004 from Products.CMFPlone.migrations.v3_0.alphas import registerToolsAsUtilities
00005 
00006 
00007 def beta2_rc1(portal):
00008     """2.5-beta2 -> 2.5-rc1
00009     """
00010     out = []
00011 
00012     # Make the portal a Zope3 site
00013     enableZope3Site(portal, out)
00014 
00015     # register some tools as utilities
00016     registerToolsAsUtilities(portal, out)
00017 
00018     # add a property indicating if this is a big or small site, so the UI can
00019     # change depending on it
00020     propTool = getToolByName(portal, 'portal_properties', None)
00021     propSheet = getattr(propTool, 'site_properties', None)
00022     if not propSheet.hasProperty('many_users'):
00023         if propSheet.hasProperty('large_site'):
00024             out.append("Migrating 'large_site' to 'many_users' property.")
00025             default=propSheet.getProperty('large_site')
00026             propSheet.manage_delProperties(ids=['large_site'])
00027         else:
00028             default=0
00029         propSheet.manage_addProperty('many_users', default, 'boolean')
00030         out.append("Added 'many_users' property to site_properties.")
00031