[CMF-checkins] SVN: CMF/trunk/CMFDefault/Portal.py - reverted Portal.py change of r39125 to fix BBB temporarily

Yvo Schubbe y.2005- at wcm-solutions.de
Wed Oct 19 03:10:16 EDT 2005


Log message for revision 39508:
  - reverted Portal.py change of r39125 to fix BBB temporarily
  
  Note: PortalGenerator will soon be removed completely from the trunk.
  

Changed:
  U   CMF/trunk/CMFDefault/Portal.py

-=-
Modified: CMF/trunk/CMFDefault/Portal.py
===================================================================
--- CMF/trunk/CMFDefault/Portal.py	2005-10-19 07:09:38 UTC (rev 39507)
+++ CMF/trunk/CMFDefault/Portal.py	2005-10-19 07:10:16 UTC (rev 39508)
@@ -203,6 +203,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:
@@ -237,6 +261,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