Back to index

plone3  3.1.7
portal_config_control.py
Go to the documentation of this file.
00001 ##parameters=**kw
00002 ##
00003 from Products.CMFCore.utils import getUtilityByInterfaceName
00004 from Products.CMFDefault.utils import Message as _
00005 
00006 ptool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IPropertiesTool')
00007 
00008 if not ptool.hasProperty('default_charset'):
00009     ptool.manage_addProperty('default_charset', '', 'string')
00010 if not ptool.hasProperty('email_charset'):
00011     ptool.manage_addProperty('email_charset', '', 'string')
00012 ptool.editProperties(kw)
00013 
00014 return context.setStatus(True, _(u'CMF Settings changed.'))