From: Tim <tim...@us...> - 2004-01-13 18:55:21
|
Update of /cvsroot/collective/Faq/Extensions In directory sc8-pr-cvs1:/tmp/cvs-serv19847/Extensions Modified Files: Install.py Log Message: Adjustment for newer Archetypes and added faq folder to user_folder_tabs and user_folder_contents in install script. /timterle Index: Install.py =================================================================== RCS file: /cvsroot/collective/Faq/Extensions/Install.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Install.py 26 Oct 2003 11:46:35 -0000 1.1 +++ Install.py 13 Jan 2004 18:55:18 -0000 1.2 @@ -1,6 +1,7 @@ from Products.Archetypes.public import listTypes from Products.Archetypes.Extensions.utils import installTypes, install_subskin from Products.Faq.config import * +from Products.CMFCore.utils import getToolByName from StringIO import StringIO @@ -13,5 +14,21 @@ install_subskin(self, out, GLOBALS) + #register the folderish items in portal_properties/site_properties + site_props = getToolByName(self, 'portal_properties').site_properties + use_folder_tabs = site_props.getProperty('use_folder_tabs') + if not 'FaqFolder' in use_folder_tabs: + site_props._updateProperty('use_folder_tabs', tuple(use_folder_tabs) + + ('FaqFolder',)) + + print >> out, "Added FaqFolder to portal_properties/site_properties/use_folder_tabs" + + use_folder_contents = site_props.getProperty('use_folder_contents') + if not 'FaqFolder' in use_folder_tabs: + site_props._updateProperty('use_folder_contents', + tuple(use_folder_tabs) + ('FaqFolder',)) + print >> out, "Added FaqFolder to portal_properties/site_properties/use_folder_contents" + + print >> out, "Successfully installed %s." % PROJECTNAME return out.getvalue() |