Add activesync page to admin menu, render tree nodes closed by default
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 12 May 2010 23:01:30 +0000 (19:01 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 12 May 2010 23:01:30 +0000 (19:01 -0400)
horde/admin/activesync.php
horde/lib/Api.php

index 21bf97d..f748349 100644 (file)
@@ -92,7 +92,7 @@ foreach ($devices as $device) {
     $node_params = array();
     if (array_search($device['device_user'], $users) === false) {
         $users[] = $device['device_user'];
-        $tree->addNode($device['device_user'], 'root', $device['device_user'], 0, true, $user_node);
+        $tree->addNode($device['device_user'], 'root', $device['device_user'], 0, false, $user_node);
     }
 
     /* Load this device */
index 0204a41..b9f3d96 100644 (file)
@@ -14,7 +14,7 @@ class Horde_Api extends Horde_Registry_Api
      */
     public function admin_list()
     {
-        return array(
+        $admin = array(
             'configuration' => array(
                 'link' => '%application%/admin/setup/',
                 'name' => _("_Setup"),
@@ -66,6 +66,16 @@ class Horde_Api extends Horde_Registry_Api
                 'icon' => 'shell.png'
             )
         );
+
+        if (!empty($GLOBALS['conf']['activesync']['enabled'])) {
+            $admin['activesync'] = array(
+                'link' => '%application%/admin/activesync.php',
+                'name' => _("ActiveSync Devices"),
+                'icon' => 'mobile.png'
+            );
+        }
+
+        return $admin;
     }
 
     /**