plugins/kolab_activesync

Aleksander Machniak machniak at kolabsys.com
Tue Jul 9 19:47:13 CEST 2013


 plugins/kolab_activesync/kolab_activesync.php    |   24 -----------------------
 plugins/kolab_activesync/kolab_activesync_ui.php |    2 -
 2 files changed, 1 insertion(+), 25 deletions(-)

New commits:
commit 8ecc1d271e12dc0784b38aeb6b125746d8ddbee6
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Tue Jul 9 19:45:54 2013 +0200

    Use kolab_storage::folders_typedata() to list folder types

diff --git a/plugins/kolab_activesync/kolab_activesync.php b/plugins/kolab_activesync/kolab_activesync.php
index 78f36c8..a53961c 100644
--- a/plugins/kolab_activesync/kolab_activesync.php
+++ b/plugins/kolab_activesync/kolab_activesync.php
@@ -36,7 +36,6 @@ class kolab_activesync extends rcube_plugin
 
     const ROOT_MAILBOX = 'INBOX';
     const ASYNC_KEY    = '/private/vendor/kolab/activesync';
-    const CTYPE_KEY    = '/shared/vendor/kolab/folder-type';
 
 
     /**
@@ -192,29 +191,6 @@ class kolab_activesync extends rcube_plugin
     }
 
     /**
-     * Returns list of folders with assigned type
-     *
-     * @return array List of folder types indexed by folder name
-     */
-    public function list_types()
-    {
-        if ($this->folder_types === null) {
-            $storage    = $this->rc->get_storage();
-            $folderdata = $storage->get_metadata('*', self::CTYPE_KEY);
-
-            $this->folder_types = array();
-
-            foreach ($folderdata as $folder => $data) {
-                if ($data[self::CTYPE_KEY]) {
-                    $this->folder_types[$folder] = $data[self::CTYPE_KEY];
-                }
-            }
-        }
-
-        return $this->folder_types;
-    }
-
-    /**
      * List known devices
      *
      * @return array Device list as hash array
diff --git a/plugins/kolab_activesync/kolab_activesync_ui.php b/plugins/kolab_activesync/kolab_activesync_ui.php
index b723668..0c753c9 100644
--- a/plugins/kolab_activesync/kolab_activesync_ui.php
+++ b/plugins/kolab_activesync/kolab_activesync_ui.php
@@ -107,7 +107,7 @@ class kolab_activesync_ui
 
         // group folders by type (show only known types)
         $folder_groups = array('mail' => array(), 'contact' => array(), 'event' => array(), 'task' => array());
-        $folder_types  = $this->plugin->list_types();
+        $folder_types  = kolab_storage::folders_typedata();
         $imei          = $this->device['_id'];
         $subscribed    = array();
 




More information about the commits mailing list