Treat Kolab format version as string

This commit is contained in:
Thomas Bruederli 2012-11-22 15:19:17 +01:00
parent 76d2b331ed
commit 4245fb0839
6 changed files with 9 additions and 6 deletions

View file

@ -56,7 +56,7 @@ class kolab_driver extends calendar_driver
$this->freebusy_trigger = $this->rc->config->get('calendar_freebusy_trigger', false);
if (kolab_storage::$version == 2.0) {
if (kolab_storage::$version == '2.0') {
$this->alarm_types = array('DISPLAY');
$this->alarm_absolute = false;
}

View file

@ -34,6 +34,9 @@ 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;
// Specify format version to write Kolab objects (must be a string value!)
$rcmail_config['kolab_format_version'] = '3.0';
// 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>';

View file

@ -2,7 +2,7 @@
/* Configuration for libkolab */
$rcmail_config['kolab_cache'] = true;
$rcmail_config['kolab_format_version'] = 3.0;
$rcmail_config['kolab_format_version'] = '3.0';
$rcmail_config['kolab_freebusy_server'] = 'https://' . $_SESSION['imap_host'] . '/freebusy';
$rcmail_config['kolab_ssl_verify_peer'] = true;

View file

@ -31,7 +31,7 @@ class kolab_storage
const SERVERSIDE_SUBSCRIPTION = 0;
const CLIENTSIDE_SUBSCRIPTION = 1;
public static $version = 3.0;
public static $version = '3.0';
public static $last_error;
private static $ready = false;

View file

@ -582,7 +582,7 @@ class kolab_storage_folder
}
// save contact photo to attachment for Kolab2 format
if (kolab_storage::$version == 2.0 && $object['photo'] && !$existing_photo) {
if (kolab_storage::$version == '2.0' && $object['photo'] && !$existing_photo) {
$attkey = 'kolab-picture.png'; // this file name is hard-coded in libkolab/kolabformatV2/contact.cpp
$object['_attachments'][$attkey] = array(
'mimetype'=> rc_image_content_type($object['photo']),
@ -800,7 +800,7 @@ 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");
$ctype = kolab_storage::$version == 2.0 ? $format->CTYPEv2 : $format->CTYPE;
$ctype = kolab_storage::$version == '2.0' ? $format->CTYPEv2 : $format->CTYPE;
// Convert new lines to \r\n, to wrokaround "NO Message contains bare newlines"
// when APPENDing from temp file
$xml = preg_replace('/\r?\n/', "\r\n", $xml);

View file

@ -47,7 +47,7 @@ class tasklist_kolab_driver extends tasklist_driver
$this->_read_lists();
if (kolab_storage::$version == 2.0) {
if (kolab_storage::$version == '2.0') {
$this->alarm_absolute = false;
}
}