[Zope-Checkins] CVS: Zope/lib/python/App - ApplicationManager.py:1.74.4.1

Andreas Jung andreas@zope.com
Mon, 22 Oct 2001 09:55:23 -0400


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

Modified Files:
      Tag: Zope-2_4-branch
	ApplicationManager.py 
Log Message:
Zope installations upgraded from pre-2.4 installations
did not show  the Webdav lockmanage entry in the control panel


=== Zope/lib/python/App/ApplicationManager.py 1.74 => 1.74.4.1 ===
         if REQUEST is not None:
             REQUEST['RESPONSE'].redirect(REQUEST['URL1']+'/manage_main')
-            
+
+
+    def objectIds(self, spec=None):     
+        """ this is a patch for pre-2.4 Zope installations. Such 
+            installations don't have an entry for the WebDAV LockManager
+            introduced in 2.4. 
+        """
+
+        meta_types = map(lambda x: x.get('meta_type',None) , self._objects)
+        
+        if not self.DavLocks.meta_type in meta_types:
+
+            lst = list(self._objects)
+            lst.append(  {'id': 'DavLocks', \
+                'meta_type': self.DavLocks.meta_type})
+            self._objects = tuple(lst)
+        
+        return Folder.objectIds(self, spec)