summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hoffend <dh@dotlan.net>2015-02-16 23:42:09 +0100
committerDaniel Hoffend <dh@dotlan.net>2015-02-16 23:42:09 +0100
commitf72cede2e6b4022e8fed43a0c694f933dae15ca6 (patch)
tree4945954a7b1f1b05140d2b9d62aa79dd1c0319f9
parent79b9ed1f6f80683ec8b57becf3f4a662cbcd274e (diff)
downloadwebadmin-f72cede2e6b4022e8fed43a0c694f933dae15ca6.tar.gz
added generate_kolabtargetfolder_sharedfolder() for shared mailboxes
-rw-r--r--lib/api/kolab_api_service_form_value.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php
index 230cff6..bd53f9c 100644
--- a/lib/api/kolab_api_service_form_value.php
+++ b/lib/api/kolab_api_service_form_value.php
@@ -566,6 +566,23 @@ class kolab_api_service_form_value extends kolab_api_service
}
}
+ private function generate_kolabtargetfolder_sharedfolder($postdata, $attribs = array())
+ {
+ if (isset($attribs['auto_form_fields']) && isset($attribs['auto_form_fields']['kolabtargetfolder'])) {
+ // Use Data Please
+ foreach ($attribs['auto_form_fields']['kolabtargetfolder']['data'] as $key) {
+ if (!isset($postdata[$key])) {
+ throw new Exception("Key not set: " . $key, 12356);
+ }
+ }
+
+ $imap_hierarchysep = '/';
+ $cn = $this->generate_cn_resource($postdata, $attribs);
+
+ return $cn ? 'shared' . $imap_hierarchysep . $cn . '@' . $_SESSION['user']->get_domain() : '';
+ }
+ }
+
private function generate_kolabtargetfolder_resource($postdata, $attribs = array())
{
if (isset($attribs['auto_form_fields']) && isset($attribs['auto_form_fields']['kolabtargetfolder'])) {