Branch 'dev/kolab3' - 4 commits - plugins/calendar plugins/libkolab
Thomas Brüderli
bruederli at kolabsys.com
Wed May 16 17:14:12 CEST 2012
plugins/calendar/lib/get_horde_icalendar.sh | 1
plugins/libkolab/README | 23 +++++++++++++++++++
plugins/libkolab/lib/kolab_storage_folder.php | 30 +++++++++++++++-----------
plugins/libkolab/libkolab.php | 8 ++++++
4 files changed, 49 insertions(+), 13 deletions(-)
New commits:
commit 3ec99f89a6555e3d1ba9256c06ef2b968d3b93a8
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed May 16 17:13:49 2012 +0200
Add option to disable SSL certificate checks when triggering Free/Busy
diff --git a/plugins/libkolab/README b/plugins/libkolab/README
index b44d4d2..0a3c0ce 100644
--- a/plugins/libkolab/README
+++ b/plugins/libkolab/README
@@ -38,3 +38,6 @@ $rcmail_config['kolab_cache'] = true;
// Defaults to https://<imap-server->/freebusy
$rcmail_config['kolab_freebusy_server'] = 'https://<some-host>/<freebusy-path>';
+// Set this option to disable SSL certificate checks when triggering Free/Busy (enabled by default)
+$rcmail_config['kolab_ssl_verify_peer'] = false;
+
diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php
index 5f6d289..da0718a 100644
--- a/plugins/libkolab/lib/kolab_storage_folder.php
+++ b/plugins/libkolab/lib/kolab_storage_folder.php
@@ -737,7 +737,9 @@ class kolab_storage_folder
require_once('HTTP/Request2.php');
try {
+ $rcmail = rcube::get_instance();
$request = new HTTP_Request2($url);
+ $request->setConfig(array('ssl_verify_peer' => $rcmail->config->get('kolab_ssl_verify_peer', true)));
// set authentication credentials
if ($auth_user && $auth_passwd)
commit e50d35c1a3202c50ac3690e3a31eb61b462fcbd5
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed May 16 17:12:54 2012 +0200
Set and read Content-ID header of MIME message parts as suggested by the spec; Uses the latest (not yet released) version of the PEAR Mail_Mime package
diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php
index 1fc84cf..5f6d289 100644
--- a/plugins/libkolab/lib/kolab_storage_folder.php
+++ b/plugins/libkolab/lib/kolab_storage_folder.php
@@ -403,8 +403,9 @@ class kolab_storage_folder
if (!$xml && ($part->mimetype == $content_type || preg_match('!application/([a-z]+\+)?xml!', $part->mimetype))) {
$xml = $part->body ? $part->body : $message->get_part_content($part->mime_id);
}
- else if ($part->filename) {
- $attachments[$part->filename] = array(
+ else if ($part->filename || $part->content_id) {
+ $key = $part->content_id ? trim($part->content_id, '<>') : $part->filename;
+ $attachments[$key] = array(
'id' => $part->mime_id,
'mimetype' => $part->mimetype,
'size' => $part->size,
@@ -625,7 +626,7 @@ class kolab_storage_folder
$format->set($object);
$xml = $format->write();
- $object['uid'] = $format->uid; // get read UID from format
+ $object['uid'] = $format->uid; // read UID from format
$object['_formatobj'] = $format;
if (!$format->is_valid() || empty($object['uid'])) {
@@ -652,13 +653,13 @@ class kolab_storage_folder
. 'To view this object you will need an email client that understands the Kolab Groupware format. '
. "For a list of such email clients please visit http://www.kolab.org/\n\n");
- $mime->addAttachment($xml,
- $format->CTYPE,
- 'kolab.xml',
- false, '8bit', 'attachment', RCMAIL_CHARSET, '', '',
- $rcmail->config->get('mime_param_folding') ? 'quoted-printable' : null,
- $rcmail->config->get('mime_param_folding') == 2 ? 'quoted-printable' : null,
- '', RCMAIL_CHARSET
+ $mime->addAttachment($xml, // file
+ $format->CTYPE, // content-type
+ 'kolab.xml', // filename
+ false, // is_file
+ '8bit', // encoding
+ 'attachment', // disposition
+ RCMAIL_CHARSET // charset
);
$part_id++;
@@ -669,12 +670,15 @@ class kolab_storage_folder
$msguid = !empty($object['_msguid']) ? $object['_msguid'] : $object['uid'];
$att['content'] = $this->get_attachment($msguid, $att['id'], $object['_mailbox']);
}
+
+ $headers = array('Content-ID' => Mail_mimePart::encodeHeader('Content-ID', '<' . $name . '>', RCMAIL_CHARSET, 'quoted-printable'));
+
if (!empty($att['content'])) {
- $mime->addAttachment($att['content'], $att['mimetype'], $name, false);
+ $mime->addAttachment($att['content'], $att['mimetype'], $name, false, 'base64', 'attachment', '', '', '', null, null, '', null, $headers);
$part_id++;
}
else if (!empty($att['path'])) {
- $mime->addAttachment($att['path'], $att['mimetype'], $name, true);
+ $mime->addAttachment($att['path'], $att['mimetype'], $name, true, 'base64', 'attachment', '', '', '', null, null, '', null, $headers);
$part_id++;
}
commit f7f6c10c4ac432255e4ed39dee9eb50dc5c6989d
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed May 16 16:33:07 2012 +0200
Add some documentation
diff --git a/plugins/calendar/lib/get_horde_icalendar.sh b/plugins/calendar/lib/get_horde_icalendar.sh
index 07b7608..1992bf2 100755
--- a/plugins/calendar/lib/get_horde_icalendar.sh
+++ b/plugins/calendar/lib/get_horde_icalendar.sh
@@ -16,6 +16,7 @@ echo "<?php
/**
* This is a concatenated copy of the following files:
* Horde/String.php, Horde/iCalendar.php, Horde/iCalendar/*.php
+ * Pull the latest version of these file from the PEAR channel of the Horde project at http://pear.horde.org
*/
require_once(dirname(__FILE__) . '/Horde_Date.php');"
diff --git a/plugins/libkolab/README b/plugins/libkolab/README
index a60d548..b44d4d2 100644
--- a/plugins/libkolab/README
+++ b/plugins/libkolab/README
@@ -18,3 +18,23 @@ REQUIREMENTS
* Optional for old format support:
Horde Kolab_Format package and all of its dependencies
which are at least Horde_(Browser,DOM,NLS,String,Utils)
+
+
+INSTALLATION
+------------
+To use local cache you need to create a dedicated table in Roundcube's database.
+To do so, execute the SQL commands in SQL/<yourdatabase>.sql
+
+
+CONFIGURATION
+-------------
+The following options can be configured in Roundcube's main config file
+or a local config file (config.inc.php) located in the plugin folder.
+
+// Enable caching of Kolab objects in local database
+$rcmail_config['kolab_cache'] = true;
+
+// Optional override of the URL to read and trigger Free/Busy information of Kolab users
+// Defaults to https://<imap-server->/freebusy
+$rcmail_config['kolab_freebusy_server'] = 'https://<some-host>/<freebusy-path>';
+
commit b95a4d19b74ef98f0299c5fcecfe025719704d15
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed May 16 16:32:49 2012 +0200
Catch errors in user's timezone settings
diff --git a/plugins/libkolab/libkolab.php b/plugins/libkolab/libkolab.php
index fd911be..bf54569 100644
--- a/plugins/libkolab/libkolab.php
+++ b/plugins/libkolab/libkolab.php
@@ -45,7 +45,13 @@ class libkolab extends rcube_plugin
set_include_path($include_path);
$rcmail = rcmail::get_instance();
- kolab_format::$timezone = new DateTimeZone($rcmail->config->get('timezone', 'GMT'));
+ try {
+ kolab_format::$timezone = new DateTimeZone($rcmail->config->get('timezone', 'GMT'));
+ }
+ catch (Exception $e) {
+ raise_error($e, true);
+ kolab_format::$timezone = new DateTimeZone('GMT');
+ }
// load (old) dependencies if available
if (@include_once('Horde/Util.php')) {
More information about the commits
mailing list