summaryrefslogtreecommitdiff
path: root/plugins/kolab_activesync
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2013-07-09 17:45:54 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2013-07-09 17:45:54 (GMT)
commit8ecc1d271e12dc0784b38aeb6b125746d8ddbee6 (patch)
tree64f13f72a42bd58ca2232829726fabd858511902 /plugins/kolab_activesync
parentc0a005b204a3e432990c9c79786fa0e90193f74b (diff)
downloadroundcubemail-plugins-kolab-8ecc1d271e12dc0784b38aeb6b125746d8ddbee6.tar.gz
Use kolab_storage::folders_typedata() to list folder types
Diffstat (limited to 'plugins/kolab_activesync')
-rw-r--r--plugins/kolab_activesync/kolab_activesync.php24
-rw-r--r--plugins/kolab_activesync/kolab_activesync_ui.php2
2 files changed, 1 insertions, 25 deletions
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();