summaryrefslogtreecommitdiff
path: root/plugins/kolab_folders
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/kolab_folders')
-rw-r--r--plugins/kolab_folders/kolab_folders.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/kolab_folders/kolab_folders.php b/plugins/kolab_folders/kolab_folders.php
index 899620f..297c858 100644
--- a/plugins/kolab_folders/kolab_folders.php
+++ b/plugins/kolab_folders/kolab_folders.php
@@ -388,9 +388,8 @@ class kolab_folders extends rcube_plugin
$namespace = $storage->get_namespace();
// get all folders of specified type
- $folderdata = array_map('implode', $folderdata);
+ $folderdata = array_map(array($this, 'folder_select_metadata'), $folderdata);
$folderdata = array_intersect($folderdata, array($type));
- unset($folders[0]);
foreach ($folderdata as $folder => $data) {
// check if folder is in personal namespace
@@ -412,6 +411,14 @@ class kolab_folders extends rcube_plugin
}
/**
+ * Callback for array_map to select the correct annotation value
+ */
+ private function folder_select_metadata($types)
+ {
+ return $types[kolab_storage::CTYPE_KEY_PRIVATE] ?: $types[kolab_storage::CTYPE_KEY];
+ }
+
+ /**
* Returns CSS class name for specified folder type
*
* @param string $type Folder type