summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-04-13 17:41:13 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-04-13 17:41:13 +0200
commitc088a04b6a5128bf0a3f23c0e4ba56e2c6041343 (patch)
treea8d5a29dd9488ca7ad7e35c6926dc0ca4b0b58a8 /doc
parent5a9a69958ddf0428cf4a6c2333715e254e6a83d6 (diff)
downloadwebadmin-c088a04b6a5128bf0a3f23c0e4ba56e2c6041343.tar.gz
Add shared folder management functionality to the Web Administration Panel Client and API interfaces
Diffstat (limited to 'doc')
-rw-r--r--doc/sample-insert-sharedfolder_types.php86
1 files changed, 86 insertions, 0 deletions
diff --git a/doc/sample-insert-sharedfolder_types.php b/doc/sample-insert-sharedfolder_types.php
new file mode 100644
index 0000000..e0609fe
--- /dev/null
+++ b/doc/sample-insert-sharedfolder_types.php
@@ -0,0 +1,86 @@
+#!/usr/bin/php
+<?php
+
+ if (isset($_SERVER["REQUEST_METHOD"]) && !empty($SERVER["REQUEST_METHOD"])) {
+ die("Not intended for execution through the webserver, sorry!");
+ }
+
+ require_once("lib/functions.php");
+
+ $db = SQL::get_instance();
+
+ $result = $db->query("TRUNCATE `sharedfolder_types`");
+
+ $attributes = Array(
+ "auto_form_fields" => Array(
+ ),
+ "fields" => Array(
+ "kolabfoldertype" => Array(
+ "contact",
+ ),
+ "objectclass" => Array(
+ "top",
+ "kolabsharedfolder",
+ ),
+ ),
+ "form_fields" => Array(
+/* TODO: Pending implementation of a folder acl list form widget - see #1752
+ "acl" => Array(
+ "type" => "folder_acl_list",
+ "optional" => true,
+ ),
+*/
+ "cn" => Array(),
+ ),
+ );
+
+ $result = $db->query("INSERT INTO `sharedfolder_types` (`key`, `name`, `description`, `attributes`) " .
+ "VALUES ('addressbook','Shared Address Book', 'A shared address book'," .
+ "'" . json_encode($attributes) . "')");
+
+ $attributes["fields"]["kolabfoldertype"] = Array('event');
+ $result = $db->query("INSERT INTO `sharedfolder_types` (`key`, `name`, `description`, `attributes`) " .
+ "VALUES ('calendar','Shared Calendar', 'A shared calendar'," .
+ "'" . json_encode($attributes) . "')");
+
+ $attributes["fields"]["kolabfoldertype"] = Array('journal');
+ $result = $db->query("INSERT INTO `sharedfolder_types` (`key`, `name`, `description`, `attributes`) " .
+ "VALUES ('journal','Shared Journal', 'A shared journal'," .
+ "'" . json_encode($attributes) . "')");
+
+ $attributes["fields"]["kolabfoldertype"] = Array('task');
+ $result = $db->query("INSERT INTO `sharedfolder_types` (`key`, `name`, `description`, `attributes`) " .
+ "VALUES ('task','Shared Tasks', 'A shared tasks folder'," .
+ "'" . json_encode($attributes) . "')");
+
+ $attributes["fields"]["kolabfoldertype"] = Array('mail');
+ $attributes["form_fields"]["alias"] = Array(
+ "type" => "list",
+ "optional" => true,
+ );
+
+ $attributes["form_fields"]["kolabdelegate"] = Array(
+ "type" => "list",
+ "autocomplete" => true,
+ "optional" => true,
+ );
+
+ $attributes["form_fields"]["kolaballowsmtprecipient"] = Array(
+ "type" => "list",
+ "optional" => true,
+ );
+
+ $attributes["form_fields"]["kolaballowsmtpsender"] = Array(
+ "type" => "list",
+ "optional" => true,
+ );
+
+ $attributes["form_fields"]["kolabtargetfolder"] = Array();
+ $attributes["form_fields"]["mail"] = Array();
+ $attributes["fields"]["objectclass"][] = "mailrecipient";
+
+ $result = $db->query("INSERT INTO `sharedfolder_types` (`key`, `name`, `description`, `attributes`) " .
+ "VALUES ('mail','Shared Mail Folder', 'A shared mail folder'," .
+ "'" . json_encode($attributes) . "')");
+
+?>