summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/libkolab/lib/kolab_storage_config.php18
-rw-r--r--plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php21
2 files changed, 20 insertions, 19 deletions
diff --git a/plugins/libkolab/lib/kolab_storage_config.php b/plugins/libkolab/lib/kolab_storage_config.php
index d58e3c0..59c191d 100644
--- a/plugins/libkolab/lib/kolab_storage_config.php
+++ b/plugins/libkolab/lib/kolab_storage_config.php
@@ -356,6 +356,24 @@ class kolab_storage_config
}
/**
+ * Simplify the given message URI by converting the mailbox
+ * part into a relative IMAP path valid for the current user.
+ */
+ public static function local_message_uri($uri)
+ {
+ if (strpos($uri, 'imap:///') === 0) {
+ $linkref = kolab_storage_config::parse_member_url($uri);
+
+ return 'imap:///' . implode('/', array_map('rawurlencode', explode('/', $linkref['folder']))) .
+ '/' . $linkref['uid'] .
+ '?' . http_build_query($linkref['params'], '', '&');
+ }
+
+ return $uri;
+ }
+
+
+ /**
* Build array of member URIs from set of messages
*
* @param string $folder Folder name
diff --git a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
index 97cdb63..6c9f418 100644
--- a/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
+++ b/plugins/tasklist/drivers/kolab/tasklist_kolab_driver.php
@@ -825,7 +825,7 @@ class tasklist_kolab_driver extends tasklist_driver
private function get_links($uid)
{
$config = kolab_storage_config::get_instance();
- return array_map(array($this, '_convert_message_uri'), $config->get_object_links($uid));
+ return array_map(array('kolab_storage_config','local_message_uri'), $config->get_object_links($uid));
}
/**
@@ -856,23 +856,6 @@ class tasklist_kolab_driver extends tasklist_driver
}
/**
- * Simplify the given message URI by converting the mailbox
- * part into a relative IMAP path valid for the current user.
- */
- protected function _convert_message_uri($uri)
- {
- if (strpos($uri, 'imap:///') === 0) {
- $linkref = kolab_storage_config::parse_member_url($uri);
-
- return 'imap:///' . implode('/', array_map('rawurlencode', explode('/', $linkref['folder']))) .
- '/' . $linkref['uid'] .
- '?' . http_build_query($linkref['params'], '', '&');
- }
-
- return $uri;
- }
-
- /**
* Extract uid + list identifiers from the given input
*
* @param mixed array or string with task identifier(s)
@@ -1296,7 +1279,7 @@ class tasklist_kolab_driver extends tasklist_driver
public function get_message_uri($headers, $folder)
{
$uri = kolab_storage_config::get_message_uri($headers, $folder);
- return $this->_convert_message_uri($uri);
+ return kolab_storage_config::local_message_uri($uri);
}
/**