summaryrefslogtreecommitdiff
path: root/plugins/tasklist/drivers/tasklist_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/tasklist/drivers/tasklist_driver.php')
-rw-r--r--plugins/tasklist/drivers/tasklist_driver.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/tasklist/drivers/tasklist_driver.php b/plugins/tasklist/drivers/tasklist_driver.php
index 1de0353..8a06db3 100644
--- a/plugins/tasklist/drivers/tasklist_driver.php
+++ b/plugins/tasklist/drivers/tasklist_driver.php
@@ -359,6 +359,24 @@ abstract class tasklist_driver
}
/**
+ * Compose an URL for CalDAV access to the given list (if configured)
+ */
+ public function tasklist_caldav_url($list)
+ {
+ $rcmail = rcube::get_instance(); console($list);
+ if (!empty($list['caldavuid']) && ($template = $rcmail->config->get('calendar_caldav_url', null))) {
+ return strtr($template, array(
+ '%h' => $_SERVER['HTTP_HOST'],
+ '%u' => urlencode($rcmail->get_user_name()),
+ '%i' => urlencode($list['caldavuid']),
+ '%n' => urlencode($list['editname']),
+ ));
+ }
+
+ return null;
+ }
+
+ /**
* Handler for user_delete plugin hook
*
* @param array Hash array with hook arguments