summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php2
-rw-r--r--plugins/tasklist/tasklist.php5
2 files changed, 6 insertions, 1 deletions
diff --git a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
index fd3e5c3..8fdaedb 100644
--- a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
+++ b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
@@ -597,7 +597,7 @@ class tasklist_kolab_driver extends tasklist_driver
'title' => $record['title'],
# 'location' => $record['location'],
'description' => $record['description'],
- 'tags' => (array)$record['categories'],
+ 'tags' => array_filter((array)$record['categories']),
'flagged' => $record['priority'] == 1,
'complete' => $record['status'] == 'COMPLETED' ? 1 : floatval($record['complete'] / 100),
'parent_id' => $record['parent_id'],
diff --git a/plugins/tasklist/tasklist.php b/plugins/tasklist/tasklist.php
index e77bccc..94cf4bb 100644
--- a/plugins/tasklist/tasklist.php
+++ b/plugins/tasklist/tasklist.php
@@ -387,6 +387,11 @@ class tasklist extends rcube_plugin
}
}
+ // convert tags to array, filter out empty entries
+ if (isset($rec['tags']) && !is_array($rec['tags'])) {
+ $rec['tags'] = array_filter((array)$rec['tags']);
+ }
+
// alarms cannot work without a date
if ($rec['alarms'] && !$rec['date'] && !$rec['startdate'] && strpos($rec['alarms'], '@') === false)
$rec['alarms'] = '';