Don't show DataTree sidebar entry if DataTree is disabled.
authorJan Schneider <jan@horde.org>
Wed, 15 Dec 2010 22:45:48 +0000 (22:45 +0000)
committerJan Schneider <jan@horde.org>
Wed, 15 Dec 2010 22:45:48 +0000 (22:45 +0000)
horde/lib/Api.php

index 9aad2f1..eacd34c 100644 (file)
@@ -82,6 +82,11 @@ class Horde_Api extends Horde_Registry_Api
             );
         }
 
+        if (empty($GLOBALS['conf']['datatree']['driver']) ||
+            $GLOBALS['conf']['datatree']['driver'] == 'null') {
+            unset($admin['datatree']);
+        }
+
         return $admin;
     }