summaryrefslogtreecommitdiff
path: root/plugins/kolab_folders
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2012-10-17 09:46:26 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2012-10-17 09:46:26 (GMT)
commitfad8e68fe7461d65b8834f77bfcdfc4264b06860 (patch)
tree847d2e42cca0d28d7feec2515955e6de90975187 /plugins/kolab_folders
parent5be0b06fcbf61dacd493467b57041f808b04f1c7 (diff)
downloadroundcubemail-plugins-kolab-fad8e68fe7461d65b8834f77bfcdfc4264b06860.tar.gz
Move kolab_folders::set_folder_type() logic to libkolab plugin and use it where appropriate (#1104)
Diffstat (limited to 'plugins/kolab_folders')
-rw-r--r--plugins/kolab_folders/kolab_folders.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/plugins/kolab_folders/kolab_folders.php b/plugins/kolab_folders/kolab_folders.php
index 297c858..3f83847 100644
--- a/plugins/kolab_folders/kolab_folders.php
+++ b/plugins/kolab_folders/kolab_folders.php
@@ -357,15 +357,7 @@ class kolab_folders extends rcube_plugin
*/
function set_folder_type($folder, $type='mail')
{
- $storage = $this->rc->get_storage();
- list($ctype, $subtype) = explode('.', $type);
-
- $success = $storage->set_metadata($folder, array(kolab_storage::CTYPE_KEY => $ctype, kolab_storage::CTYPE_KEY_PRIVATE => $subtype ? $type : null));
-
- if (!$success) // fallback: only set private annotation
- $success |= $storage->set_metadata($folder, array(kolab_storage::CTYPE_KEY_PRIVATE => $type));
-
- return $uccess;
+ return kolab_storage::set_folder_type($folder, $type);
}
/**