[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS - FolderAdder.py:1.1.2.7 FolderContents.py:1.1.2.5

Stephan Richter srichter@cbu.edu
Sat, 19 Jan 2002 14:59:00 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS
In directory cvs.zope.org:/tmp/cvs-serv5130

Modified Files:
      Tag: Zope-3x-branch
	FolderAdder.py FolderContents.py 
Log Message:
- made a small correction to the Folder tests
- added delete support in the folder main view


=== Zope3/lib/python/Zope/App/OFS/FolderAdder.py 1.1.2.6 => 1.1.2.7 ===
             raise DuplicateIDError, "ID '%s' already in use." % id
         self._folder.setObject( id, createObject( self._folder, type_name ) )
+
         # XXX:  This is horribly broken, but I can't do better until
         #       we have a way to compute absolute URLs.
         if REQUEST is not None:


=== Zope3/lib/python/Zope/App/OFS/FolderContents.py 1.1.2.4 => 1.1.2.5 ===
         return info
 
+
+    def removeObjects(self, ids, REQUEST=None):
+        """ """
+        for id in ids:
+            self.remove(id)
+
+        # XXX:  This is horribly broken, but I can't do better until
+        #       we have a way to compute absolute URLs.
+        if REQUEST is not None:
+            # for unit tests
+            REQUEST['RESPONSE'].redirect(REQUEST['URL1'])
+        return self.confirmRemoved()
+    
+
     def remove( self, name, silent=0 ):
         """
             Remove the object stored under 'name', or raise a KeyError