summaryrefslogtreecommitdiff
path: root/plugins/tasklist/drivers
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-08-13 16:02:48 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-08-13 16:02:48 (GMT)
commita2d519a1aeead0799cddfc931da6387c26050170 (patch)
tree86994263a777d4e9494883498ec313569508e5a3 /plugins/tasklist/drivers
parent81450b627e67547ab0285fdd4f8335361d406c5d (diff)
downloadroundcubemail-plugins-kolab-a2d519a1aeead0799cddfc931da6387c26050170.tar.gz
Don't sort default task folder to top when it's a sub folder. This will add duplicates to the treelist
Diffstat (limited to 'plugins/tasklist/drivers')
-rw-r--r--plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
index 662311c..e60719c 100644
--- a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
+++ b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
@@ -71,10 +71,12 @@ class tasklist_kolab_driver extends tasklist_driver
$folders = kolab_storage::sort_folders(kolab_storage::get_folders('task'));
$this->lists = $this->folders = array();
+ $delim = $this->rc->get_storage()->get_hierarchy_delimiter();
+
// find default folder
$default_index = 0;
foreach ($folders as $i => $folder) {
- if ($folder->default)
+ if ($folder->default && strpos($folder->name, $delim) === false)
$default_index = $i;
}
@@ -85,7 +87,6 @@ class tasklist_kolab_driver extends tasklist_driver
array_unshift($folders, $default_folder);
}
- $delim = $this->rc->get_storage()->get_hierarchy_delimiter();
$prefs = $this->rc->config->get('kolab_tasklists', array());
foreach ($folders as $folder) {