[CMF-checkins] SVN: CMF/branches/1.5/CMFDefault/Portal.py -
reverted Portal.py change of r39123 to fix BBB
Yvo Schubbe
y.2005- at wcm-solutions.de
Wed Oct 19 03:09:39 EDT 2005
Log message for revision 39507:
- reverted Portal.py change of r39123 to fix BBB
Changed:
U CMF/branches/1.5/CMFDefault/Portal.py
-=-
Modified: CMF/branches/1.5/CMFDefault/Portal.py
===================================================================
--- CMF/branches/1.5/CMFDefault/Portal.py 2005-10-18 22:13:10 UTC (rev 39506)
+++ CMF/branches/1.5/CMFDefault/Portal.py 2005-10-19 07:09:38 UTC (rev 39507)
@@ -278,6 +278,30 @@
fti = FactoryTypeInformation(**t)
tool._setObject(t['id'], fti)
+ def setupMimetypes(self, p):
+ p.manage_addProduct[ 'CMFCore' ].manage_addRegistry()
+ reg = p.content_type_registry
+
+ reg.addPredicate( 'link', 'extension' )
+ reg.getPredicate( 'link' ).edit( extensions="url, link" )
+ reg.assignTypeName( 'link', 'Link' )
+
+ reg.addPredicate( 'news', 'extension' )
+ reg.getPredicate( 'news' ).edit( extensions="news" )
+ reg.assignTypeName( 'news', 'News Item' )
+
+ reg.addPredicate( 'document', 'major_minor' )
+ reg.getPredicate( 'document' ).edit( major="text", minor="" )
+ reg.assignTypeName( 'document', 'Document' )
+
+ reg.addPredicate( 'image', 'major_minor' )
+ reg.getPredicate( 'image' ).edit( major="image", minor="" )
+ reg.assignTypeName( 'image', 'Image' )
+
+ reg.addPredicate( 'file', 'major_minor' )
+ reg.getPredicate( 'file' ).edit( major="application", minor="" )
+ reg.assignTypeName( 'file', 'File' )
+
def setupWorkflow(self, p):
wftool = getToolByName(p, 'portal_workflow', None)
if wftool is None:
@@ -312,6 +336,7 @@
self.setupTypes(p, PortalFolder.factory_type_information)
self.setupTypes(p, Topic.factory_type_information)
+ self.setupMimetypes(p)
self.setupWorkflow(p)
def create(self, parent, id, create_userfolder):
More information about the CMF-checkins
mailing list