diff --git a/plugins/kolab_activesync/kolab_activesync.php b/plugins/kolab_activesync/kolab_activesync.php index 78f36c84..a53961c0 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'; /** @@ -191,29 +190,6 @@ class kolab_activesync extends rcube_plugin return $storage->list_folders(); } - /** - * 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 * diff --git a/plugins/kolab_activesync/kolab_activesync_ui.php b/plugins/kolab_activesync/kolab_activesync_ui.php index b723668f..0c753c90 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();