[CMF-checkins] SVN: CMF/trunk/CMF - reverted r68355 and part of r68353 (removing the default portal type of PortalFolder was no good idea)

Yvo Schubbe y.2006_ at wcm-solutions.de
Mon May 29 15:42:51 EDT 2006


Log message for revision 68358:
  - reverted r68355 and part of r68353 (removing the default portal type of PortalFolder was no good idea)

Changed:
  U   CMF/trunk/CMFCore/PortalFolder.py
  U   CMF/trunk/CMFCore/PortalObject.py
  U   CMF/trunk/CMFCore/tests/test_PortalFolder.py
  U   CMF/trunk/CMFDefault/setuphandlers.py

-=-
Modified: CMF/trunk/CMFCore/PortalFolder.py
===================================================================
--- CMF/trunk/CMFCore/PortalFolder.py	2006-05-29 18:04:27 UTC (rev 68357)
+++ CMF/trunk/CMFCore/PortalFolder.py	2006-05-29 19:42:51 UTC (rev 68358)
@@ -467,6 +467,7 @@
 
     __implements__ = (PortalFolderBase.__implements__,
                       OrderSupport.__implements__)
+    portal_type = 'Folder'
 
     security = ClassSecurityInfo()
 

Modified: CMF/trunk/CMFCore/PortalObject.py
===================================================================
--- CMF/trunk/CMFCore/PortalObject.py	2006-05-29 18:04:27 UTC (rev 68357)
+++ CMF/trunk/CMFCore/PortalObject.py	2006-05-29 19:42:51 UTC (rev 68358)
@@ -35,7 +35,6 @@
 
     implements(ISiteRoot)
     meta_type = 'Portal Site'
-    portal_type = 'Folder'
     _isPortalRoot = 1
 
     # Ensure certain attributes come from the correct base class.

Modified: CMF/trunk/CMFCore/tests/test_PortalFolder.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_PortalFolder.py	2006-05-29 18:04:27 UTC (rev 68357)
+++ CMF/trunk/CMFCore/tests/test_PortalFolder.py	2006-05-29 19:42:51 UTC (rev 68358)
@@ -298,7 +298,6 @@
         from Products.CMFCore.PortalFolder import PortalFolder
 
         test = self._makeOne('test')
-        test._setPortalTypeName('Folder')
 
         ttool = self.site._setObject( 'portal_types', TypesTool() )
         ttool._setObject( 'Folder'
@@ -356,10 +355,8 @@
         ttool._setObject( 'Dummy Content', FTI(**fti) )
         ttool._setObject( 'Folder', FTI(**fti) )
         sub1 = self._makeOne('sub1')
-        sub1._setPortalTypeName('Folder')
         sub1._setObject( 'dummy', DummyContent( 'dummy' ) )
         sub2 = self._makeOne('sub2')
-        sub2._setPortalTypeName('Folder')
         sub2.all_meta_types = extra_meta_types()
 
         # Allow adding of Dummy Content
@@ -900,8 +897,6 @@
             self.app._setObject( 'folder2', PortalFolder( 'folder2' ) )
             folder1 = getattr( self.app, 'folder1' )
             folder2 = getattr( self.app, 'folder2' )
-            folder1._setPortalTypeName('Folder')
-            folder2._setPortalTypeName('Folder')
 
             manage_addFile( folder1, 'file'
                           , file='', content_type='text/plain')

Modified: CMF/trunk/CMFDefault/setuphandlers.py
===================================================================
--- CMF/trunk/CMFDefault/setuphandlers.py	2006-05-29 18:04:27 UTC (rev 68357)
+++ CMF/trunk/CMFDefault/setuphandlers.py	2006-05-29 19:42:51 UTC (rev 68358)
@@ -28,7 +28,6 @@
 
     try:
         site.manage_addPortalFolder('Members')
-        site.Members._setPortalTypeName('Folder')
     except BadRequest:
         return 'Various settings: Nothing to import.'
     site.Members.manage_addProduct['OFSP'].manage_addDTMLMethod('index_html',



More information about the CMF-checkins mailing list