Branch 'dev/recurring-invitations' - 2 commits - plugins/calendar plugins/libcalendaring plugins/libkolab
Thomas Brüderli
bruederli at kolabsys.com
Sun Feb 15 18:39:33 CET 2015
plugins/calendar/drivers/kolab/kolab_driver.php | 11 ++++++-----
plugins/libcalendaring/lib/libcalendaring_itip.php | 4 ++--
plugins/libcalendaring/libcalendaring.php | 2 +-
plugins/libcalendaring/localization/en_US.inc | 6 +++---
plugins/libkolab/lib/kolab_format_event.php | 1 -
5 files changed, 12 insertions(+), 12 deletions(-)
New commits:
commit dbdce67e1e0c6675dc4bbaaa0d9056189328e1f0
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Sun Feb 15 18:39:28 2015 +0100
Better distinction of 'current' and 'future' itip messages in UI and message text
diff --git a/plugins/libcalendaring/lib/libcalendaring_itip.php b/plugins/libcalendaring/lib/libcalendaring_itip.php
index 53284a4..f56463c 100644
--- a/plugins/libcalendaring/lib/libcalendaring_itip.php
+++ b/plugins/libcalendaring/lib/libcalendaring_itip.php
@@ -125,7 +125,7 @@ class libcalendaring_itip
$recurrence_info = '';
if (!empty($event['recurrence_id'])) {
- $recurrence_info = "\n\n** " . $this->gettext('itip'.strtolower($method).'occurrenceonly') . ' **';
+ $recurrence_info = "\n\n** " . $this->gettext($event['thisandfuture'] ? 'itipmessagefutureoccurrence' : 'itipmessagesingleoccurrence') . ' **';
}
else if (!empty($event['recurrence'])) {
$recurrence_info = sprintf("\n%s: %s", $this->gettext('recurring'), $this->lib->recurrence_text($event['recurrence']));
@@ -742,7 +742,7 @@ class libcalendaring_itip
}
if (!empty($event['recurrence_date'])) {
$table->add('label', '');
- $table->add('recurrence-id', $this->gettext('itipsingleoccurrence'));
+ $table->add('recurrence-id', $this->gettext($event['thisandfuture'] ? 'itipfutureoccurrence' : 'itipsingleoccurrence'));
}
else if (!empty($event['recurrence'])) {
$table->add('label', $this->gettext('recurring'));
diff --git a/plugins/libcalendaring/localization/en_US.inc b/plugins/libcalendaring/localization/en_US.inc
index 31f08fd..992113a 100644
--- a/plugins/libcalendaring/localization/en_US.inc
+++ b/plugins/libcalendaring/localization/en_US.inc
@@ -111,9 +111,9 @@ $labels['declineattendeeconfirm'] = 'Enter a message to the declined participant
$labels['rsvprecurringevent'] = 'This is a series of events! Does your response apply to all, this occurrence only or this and future occurrences?';
$labels['itipsingleoccurrence'] = 'This is a <em>single occurrence</em> out of a series of events';
-$labels['itiprequestoccurrenceonly'] = 'The invitation only refers to this single occurrence';
-$labels['itipreplyoccurrenceonly'] = 'The response only refers to this single occurrence';
-$labels['itipcanceloccurrenceonly'] = 'The cancellation only refers to this single occurrence';
+$labels['itipfutureoccurrence'] = 'Refers to <em>this and all future occurrences</em> of a series of events';
+$labels['itipmessagesingleoccurrence'] = 'The message only refers to this single occurrence';
+$labels['itipmessagefutureoccurrence'] = 'The message refers to this and all future occurrences';
$labels['youhaveaccepted'] = 'You have accepted this invitation';
$labels['youhavetentative'] = 'You have tentatively accepted this invitation';
commit 108fae9dd038c9756f6edfaff7ed9f39e4200d7d
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Sun Feb 15 18:27:38 2015 +0100
Correctly save 'this-and-future' replies; remove some internal properties before saving (to cache)
diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php
index d4a3436..e414b87 100644
--- a/plugins/calendar/drivers/kolab/kolab_driver.php
+++ b/plugins/calendar/drivers/kolab/kolab_driver.php
@@ -899,12 +899,16 @@ class kolab_driver extends calendar_driver
else if ($old['recurrence']['EXCEPTIONS'])
$event['recurrence']['EXCEPTIONS'] = $old['recurrence']['EXCEPTIONS'];
+ // remove some internal properties which should not be saved
+ unset($event['_savemode'], $event['_fromcalendar'], $event['_identity'], $event['_owner'],
+ $event['_notify'], $event['_method'], $event['_sender'], $event['_sender_utf'], $event['_size']);
+
switch ($savemode) {
case 'new':
// save submitted data as new (non-recurring) event
$event['recurrence'] = array();
$event['uid'] = $this->cal->generate_uid();
- unset($event['recurrence_id'], $event['id'], $event['_savemode'], $event['_fromcalendar'], $event['_identity'], $event['_notify']);
+ unset($event['recurrence_id'], $event['_instance'], $event['id']);
// copy attachment data to new event
foreach ((array)$event['attachments'] as $idx => $attachment) {
@@ -921,16 +925,13 @@ class kolab_driver extends calendar_driver
// recurring instances shall not store recurrence rules and attachments
$event['recurrence'] = array();
$event['thisandfuture'] = $savemode == 'future';
- unset($event['attachments']);
+ unset($event['attachments'], $event['id']);
// increment sequence of this instance if scheduling is affected
if ($reschedule) {
$event['sequence'] = max($old['sequence'], $master['sequence']) + 1;
}
- // remove some internal properties which should not be saved
- unset($event['id'], $event['_savemode'], $event['_fromcalendar'], $event['_identity'], $event['_notify']);
-
// save properties to a recurrence exception instance
if ($old['recurrence_id'] && is_array($master['recurrence']['EXCEPTIONS'])) {
foreach ($master['recurrence']['EXCEPTIONS'] as $i => $exception) {
diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php
index c3bf625..63a0548 100644
--- a/plugins/libcalendaring/libcalendaring.php
+++ b/plugins/libcalendaring/libcalendaring.php
@@ -1414,7 +1414,7 @@ class libcalendaring extends rcube_plugin
if (!empty($object['recurrence_date']) && is_a($object['recurrence_date'], 'DateTime')) {
$recurrence_id_format = $object['allday'] ? 'Ymd' : 'Ymd\THis';
$object['_instance'] = $object['recurrence_date']->format($recurrence_id_format);
- $object['_savemode'] = $event['thisandfuture'] ? 'future' : 'current';
+ $object['_savemode'] = $object['thisandfuture'] ? 'future' : 'current';
}
else if (!empty($object['recurrence_id']) || !empty($object['_instance'])) {
if (strlen($object['_instance']) > 4) {
diff --git a/plugins/libkolab/lib/kolab_format_event.php b/plugins/libkolab/lib/kolab_format_event.php
index fe10f9d..a5b0f73 100644
--- a/plugins/libkolab/lib/kolab_format_event.php
+++ b/plugins/libkolab/lib/kolab_format_event.php
@@ -103,7 +103,6 @@ class kolab_format_event extends kolab_format_xcal
foreach((array)$object['recurrence']['EXCEPTIONS'] as $i => $exception) {
$exevent = new kolab_format_event;
$exevent->set(($compacted = $this->compact_exception($exception, $object))); // only save differing values
- console('COMPACTED', $compacted);
// get value for recurrence-id
if (!empty($exception['recurrence_date']) && is_a($exception['recurrence_date'], 'DateTime')) {
More information about the commits
mailing list