Branch 'roundcubemail-plugins-kolab-format2-horde5' - plugins/calendar
Thomas Brüderli
bruederli at kolabsys.com
Wed Jan 30 15:34:37 CET 2013
plugins/calendar/calendar.php | 10 +++++++---
plugins/calendar/config.inc.php.dist | 9 +++++++--
plugins/calendar/package.xml | 6 +++---
3 files changed, 17 insertions(+), 8 deletions(-)
New commits:
commit 3b947360ccade917892a2b35a80987331b95229c
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed Jan 30 15:34:30 2013 +0100
Disable DTSTAMP checks for iTip messages (#1485, #1489)
diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index 5780c95..f777cb3 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -8,7 +8,7 @@
* @author Thomas Bruederli <bruederli at kolabsys.com>
*
* Copyright (C) 2010, Lazlo Westerhof <hello at lazlo.me>
- * Copyright (C) 2012, Kolab Systems AG <contact at kolabsys.com>
+ * Copyright (C) 2013, Kolab Systems AG <contact at kolabsys.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -734,7 +734,9 @@ class calendar extends rcube_plugin
}
else if (in_array($status, array('ACCEPTED','TENTATIVE','DECLINED'))) {
$html = html::div('rsvp-status ' . strtolower($status), $this->gettext('youhave'.strtolower($status)));
- if ($existing['sequence'] >= $event['sequence'] || (!$event['sequence'] && $existing['changed'] && $existing['changed'] >= $event['changed'])) {
+ if ($existing['sequence'] >= $event['sequence'] || (!$event['sequence']
+ && $this->rc->config->get('calendar_itip_dtstampcheck', false)
+ && $existing['changed'] && $existing['changed'] >= $event['changed'])) {
$action = ''; // nothing to do here
}
}
@@ -1809,6 +1811,7 @@ class calendar extends rcube_plugin
$existing = $this->driver->get_event($event['uid'], true, false, true);
if ($existing) {
+ $calendar = $calendars[$existing['calendar']];
// only update attendee status
if ($this->ical->method == 'REPLY') {
// try to identify the attendee using the email sender address
@@ -1845,7 +1848,8 @@ class calendar extends rcube_plugin
}
}
// import the (newer) event
- else if ($event['sequence'] >= $existing['sequence'] || $event['changed'] >= $existing['changed']) {
+ else if ($event['sequence'] >= $existing['sequence'] || (!$event['sequence']
+ && (!$this->rc->config->get('calendar_itip_dtstampcheck', false) || $event['changed'] >= $existing['changed']))) {
$event['id'] = $existing['id'];
$event['calendar'] = $existing['calendar'];
$success = $this->driver->edit_event($event);
diff --git a/plugins/calendar/config.inc.php.dist b/plugins/calendar/config.inc.php.dist
index fb642ec..cea4878 100644
--- a/plugins/calendar/config.inc.php.dist
+++ b/plugins/calendar/config.inc.php.dist
@@ -2,10 +2,10 @@
/*
+-------------------------------------------------------------------------+
| Configuration for the Calendar plugin |
- | Version 0.7-beta |
+ | Version 0.9.0-format2 |
| |
| Copyright (C) 2010, Lazlo Westerhof - Netherlands |
- | Copyright (C) 2011, Kolab Systems AG |
+ | Copyright (C) 2013, Kolab Systems AG |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU Affero General Public License as |
@@ -29,6 +29,11 @@
// backend type (database, google, kolab)
$rcmail_config['calendar_driver'] = "database";
+// optionally enable the DTSTAMP check for iTip messages (disabled by default).
+// setting this to true will only show RSVP buttons if an iTip inivation is newer
+// than the local copy of the matching event.
+$rcmail_config['calendar_itip_dtstampcheck'] = false;
+
// default calendar view (agendaDay, agendaWeek, month)
$rcmail_config['calendar_default_view'] = "agendaWeek";
diff --git a/plugins/calendar/package.xml b/plugins/calendar/package.xml
index 881ce65..a2f0f19 100644
--- a/plugins/calendar/package.xml
+++ b/plugins/calendar/package.xml
@@ -19,10 +19,10 @@
<email>machniak at kolabsys.com</email>
<active>yes</active>
</developer>
- <date>2012-11-08</date>
+ <date>2013-01-30</date>
<version>
- <release>0.9-beta</release>
- <api>0.9-beta</api>
+ <release>0.9.0-format2</release>
+ <api>0.9</api>
</version>
<stability>
<release>stable</release>
More information about the commits
mailing list