[CMF-checkins] CVS: Products/CMFCore - PortalFolder.py:1.71.2.7 TypesTool.py:1.74.2.9

Jens Vagelpohl jens at dataflake.org
Wed Mar 23 16:55:28 EST 2005


Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv10443/CMFCore

Modified Files:
      Tag: CMF-1_5-branch
	PortalFolder.py TypesTool.py 
Log Message:
- CMFCore.TypesTool and CMFCore.PortalFolder: If invokeFactory is
  called from code it will now hand back the created object's ID. This
  does not change any behavior when called directly from the web. Both
  methods returned None before, so there is no dependencies anywhere
  on their return values, anyway. (http://collector.zope.org/CMF/331)


=== Products/CMFCore/PortalFolder.py 1.71.2.6 => 1.71.2.7 ===
--- Products/CMFCore/PortalFolder.py:1.71.2.6	Wed Mar  9 16:33:00 2005
+++ Products/CMFCore/PortalFolder.py	Wed Mar 23 16:55:28 2005
@@ -415,7 +415,7 @@
             if not myType.allowType( type_name ):
                 raise ValueError('Disallowed subobject type: %s' % type_name)
 
-        pt.constructContent(type_name, self, id, RESPONSE, *args, **kw)
+        return pt.constructContent(type_name, self, id, RESPONSE, *args, **kw)
 
     security.declareProtected(AddPortalContent, 'checkIdAvailable')
     def checkIdAvailable(self, id):


=== Products/CMFCore/TypesTool.py 1.74.2.8 => 1.74.2.9 ===
--- Products/CMFCore/TypesTool.py:1.74.2.8	Wed Mar 16 06:33:52 2005
+++ Products/CMFCore/TypesTool.py	Wed Mar 23 16:55:28 2005
@@ -923,6 +923,8 @@
                                       , info.immediate_view )
             RESPONSE.redirect( immediate_url )
 
+        return ob.getId()
+
     security.declarePrivate( 'listActions' )
     def listActions(self, info=None, object=None):
         """ List all the actions defined by a provider.



More information about the CMF-checkins mailing list