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

Andreas Jung andreas@zope.com
Mon, 22 Oct 2001 10:02:51 -0400


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

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


=== Zope/lib/python/App/ApplicationManager.py 1.75 => 1.76 ===
     def getCLIENT_HOME(self):
         return CLIENT_HOME
+
+    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)
+