[Zope-CVS] CVS: Products/DBTab - CHANGES.txt:1.1 ControlPanelPatch.py:1.3 DBTab.py:1.6

Shane Hathaway shane@zope.com
Wed, 18 Dec 2002 15:49:11 -0500


Update of /cvs-repository/Products/DBTab
In directory cvs.zope.org:/tmp/cvs-serv16740

Modified Files:
	ControlPanelPatch.py DBTab.py 
Added Files:
	CHANGES.txt 
Log Message:
- Fixed bug reported by Robert Boulanger:

    If the Storage/Databasename is the same like the mountpath it is
    not possible to access the database management screens in the
    Control Panel. Instead getting Admin screens for Cache and
    Activity you will be redirected to the manage workspace of the
    folder.

  Fixed by adding a __bobo_traverse__ hook to the Database control panel.

- Added CHANGES.txt



=== Added File Products/DBTab/CHANGES.txt ===
Version 1.0.1

- Deferred startup until after MainConfiguration has been imported.
  Needed for ZRS.

- Added AdaptableStorage and BerkeleyStorage to the list of
  easily-configured storage types.

- Fixed bug reported by Robert Boulanger:

    If the Storage/Databasename is the same like the mountpath it is
    not possible to access the database management screens in the
    Control Panel. Instead getting Admin screens for Cache and
    Activity you will be redirected to the manage workspace of the
    folder.




=== Products/DBTab/ControlPanelPatch.py 1.2 => 1.3 ===
--- Products/DBTab/ControlPanelPatch.py:1.2	Thu Oct 17 16:44:18 2002
+++ Products/DBTab/ControlPanelPatch.py	Wed Dec 18 15:49:11 2002
@@ -80,6 +80,11 @@
         m._p_jar = FakeConnection(db, self.getPhysicalRoot()._p_jar)
         return m.__of__(self)
 
+    def __bobo_traverse__(self, request, name):
+        if configuration.hasDatabase(name):
+            return self[name]
+        return getattr(self, name)
+
     def tpValues(self):
         names = self.getDatabaseNames()
         res = []


=== Products/DBTab/DBTab.py 1.5 => 1.6 ===
--- Products/DBTab/DBTab.py:1.5	Mon Dec 16 15:02:36 2002
+++ Products/DBTab/DBTab.py	Wed Dec 18 15:49:11 2002
@@ -277,6 +277,11 @@
         return self.db_factories.keys()
 
 
+    def hasDatabase(self, name):
+        """Returns true if name is the name of a configured database."""
+        return self.db_factories.has_key(name)
+
+
     def _mountPathError(self, mount_path):
         if mount_path == '/':
             raise DBTabConfigurationError(