summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-01-30 08:35:14 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-01-30 08:35:14 (GMT)
commit7bc141f573de60441eaeba441f5a472023d03662 (patch)
tree914be06eabb9b0abc2709e410534a21ee7e50235
parent4a978d991f43b3ce36a68702e959776062c55484 (diff)
downloadroundcubemail-plugins-kolab-7bc141f573de60441eaeba441f5a472023d03662.tar.gz
Added config option to disable DTSTAMP checks of iTip messages (#1485, #1489)
-rw-r--r--plugins/calendar/calendar.php6
-rw-r--r--plugins/calendar/config.inc.php.dist6
2 files changed, 9 insertions, 3 deletions
diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index 4acab52..5121e88 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -740,7 +740,7 @@ 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['changed'] && $event['changed'] < $existing['changed']) {
+ if ($this->rc->config->get('calendar_itip_dtstampcheck', true) && $existing['changed'] && $event['changed'] < $existing['changed']) {
$action = '';
}
}
@@ -2213,14 +2213,16 @@ class calendar extends rcube_plugin
}
// import the (newer) event
// TODO: compare SEQUENCE numbers instead of changed dates
- else if ($event['changed'] >= $existing['changed']) {
+ else if ($event['changed'] >= $existing['changed'] || !$this->rc->config->get('calendar_itip_dtstampcheck', true)) {
$event['id'] = $existing['id'];
$event['calendar'] = $existing['calendar'];
$success = $this->driver->edit_event($event);
+ $calendar = $calendars[$event['calendar']];
}
else if (!empty($status)) {
$existing['attendees'] = $event['attendees'];
$success = $this->driver->edit_event($existing);
+ $calendar = $calendars[$existing['calendar']];
}
else
$error_msg = $this->gettext('newerversionexists');
diff --git a/plugins/calendar/config.inc.php.dist b/plugins/calendar/config.inc.php.dist
index 8ad1676..13c984a 100644
--- a/plugins/calendar/config.inc.php.dist
+++ b/plugins/calendar/config.inc.php.dist
@@ -2,7 +2,7 @@
/*
+-------------------------------------------------------------------------+
| Configuration for the Calendar plugin |
- | Version 0.7.4 |
+ | Version 0.7.4 |
| |
| Copyright (C) 2010, Lazlo Westerhof - Netherlands |
| Copyright (C) 2011, Kolab Systems AG |
@@ -21,6 +21,10 @@
// backend type (database, google, kolab)
$rcmail_config['calendar_driver'] = "database";
+// optionally disable the DTSTAMP check of iTip messages (enabled by default)
+// setting this to false will always show RSVP buttons, even for invitations older than the local copy
+$rcmail_config['calendar_itip_dtstampcheck'] = true;
+
// default calendar view (agendaDay, agendaWeek, month)
$rcmail_config['calendar_default_view'] = "agendaWeek";