[CMF-checkins] CVS: Products/CMFCore - PortalFolder.py:1.70
Yvo Schubbe
y.2004_ at wcm-solutions.de
Wed Aug 11 06:50:34 EDT 2004
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv12907/CMFCore
Modified Files:
PortalFolder.py
Log Message:
- fixed PUT for new objects (NullResource calls addCreator on a bare object)
- some related cleanup and test refactoring
=== Products/CMFCore/PortalFolder.py 1.69 => 1.70 ===
--- Products/CMFCore/PortalFolder.py:1.69 Tue Aug 10 05:47:10 2004
+++ Products/CMFCore/PortalFolder.py Wed Aug 11 06:50:03 2004
@@ -357,12 +357,14 @@
pass
def PUT_factory( self, name, typ, body ):
+ """ Factory for PUT requests to objects which do not yet exist.
+
+ Used by NullResource.PUT.
+
+ Returns -- Bare and empty object of the appropriate type (or None, if
+ we don't know what to do)
"""
- Dispatcher for PUT requests to non-existent IDs. Returns
- an object of the appropriate type (or None, if we don't
- know what to do).
- """
- registry = getToolByName( self, 'content_type_registry' )
+ registry = getToolByName(self, 'content_type_registry', None)
if registry is None:
return None
@@ -372,7 +374,7 @@
self.invokeFactory( typeObjectName, name )
- # XXX: this is butt-ugly.
+ # invokeFactory does too much, so the object has to be removed again
obj = aq_base( self._getOb( name ) )
self._delObject( name )
return obj
More information about the CMF-checkins
mailing list