plugins/calendar plugins/tasklist
Thomas Brüderli
bruederli at kolabsys.com
Mon Aug 4 19:22:23 CEST 2014
plugins/calendar/calendar.php | 11 +++++------
plugins/tasklist/tasklist.php | 10 +++++-----
2 files changed, 10 insertions(+), 11 deletions(-)
New commits:
commit c4dec3203434800106735a38b49a5ce01f174930
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Mon Aug 4 19:22:08 2014 +0200
Fix method check after refactoring iTip message parsing
diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index a17cac0..be36499 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -2398,7 +2398,7 @@ class calendar extends rcube_plugin
'changed' => is_object($event['changed']) ? $event['changed']->format('U') : 0,
'sequence' => intval($event['sequence']),
'fallback' => strtoupper($status),
- 'method' => $this->ical->method,
+ 'method' => $event['_method'],
'task' => 'calendar',
);
@@ -2442,7 +2442,7 @@ class calendar extends rcube_plugin
if ($existing) {
// only update attendee status
- if ($this->ical->method == 'REPLY') {
+ if ($$event['_method'] == 'REPLY') {
// try to identify the attendee using the email sender address
$existing_attendee = -1;
foreach ($existing['attendees'] as $i => $attendee) {
@@ -2502,7 +2502,7 @@ class calendar extends rcube_plugin
}
// set status=CANCELLED on CANCEL messages
- if ($this->ical->method == 'CANCEL')
+ if ($event['_method'] == 'CANCEL')
$event['status'] = 'CANCELLED';
// show me as free when declined (#1670)
if ($status == 'declined' || $event['status'] == 'CANCELLED')
@@ -2532,7 +2532,7 @@ class calendar extends rcube_plugin
}
if ($success) {
- $message = $this->ical->method == 'REPLY' ? 'attendeupdateesuccess' : ($deleted ? 'successremoval' : ($existing ? 'updatedsuccessfully' : 'importedsuccessfully'));
+ $message = $event['_method'] == 'REPLY' ? 'attendeupdateesuccess' : ($deleted ? 'successremoval' : ($existing ? 'updatedsuccessfully' : 'importedsuccessfully'));
$this->rc->output->command('display_message', $this->gettext(array('name' => $message, 'vars' => array('calendar' => $calendar['name']))), 'confirmation');
$metadata['rsvp'] = intval($metadata['rsvp']);
@@ -2543,9 +2543,8 @@ class calendar extends rcube_plugin
else if ($error_msg)
$this->rc->output->command('display_message', $error_msg, 'error');
-
// send iTip reply
- if ($this->ical->method == 'REQUEST' && $organizer && !$noreply && !in_array(strtolower($organizer['email']), $emails) && !$error_msg) {
+ if ($event['_method'] == 'REQUEST' && $organizer && !$noreply && !in_array(strtolower($organizer['email']), $emails) && !$error_msg) {
$event['comment'] = get_input_value('_comment', RCUBE_INPUT_POST);
$itip = $this->load_itip();
$itip->set_sender_email($reply_sender);
diff --git a/plugins/tasklist/tasklist.php b/plugins/tasklist/tasklist.php
index 6820384..dfd8bd9 100644
--- a/plugins/tasklist/tasklist.php
+++ b/plugins/tasklist/tasklist.php
@@ -1555,7 +1555,7 @@ class tasklist extends rcube_plugin
'changed' => is_object($task['changed']) ? $task['changed']->format('U') : 0,
'sequence' => intval($task['sequence']),
'fallback' => strtoupper($status),
- 'method' => $this->ical->method,
+ 'method' => $task['_method'],
'task' => 'tasks',
);
@@ -1599,7 +1599,7 @@ class tasklist extends rcube_plugin
if ($existing) {
// only update attendee status
- if ($this->ical->method == 'REPLY') {
+ if ($task['_method'] == 'REPLY') {
// try to identify the attendee using the email sender address
$existing_attendee = -1;
foreach ($existing['attendees'] as $i => $attendee) {
@@ -1660,7 +1660,7 @@ class tasklist extends rcube_plugin
}
// set status=CANCELLED on CANCEL messages
- if ($this->ical->method == 'CANCEL') {
+ if ($task['_method'] == 'CANCEL') {
$task['status'] = 'CANCELLED';
}
// show me as free when declined (#1670)
@@ -1698,7 +1698,7 @@ class tasklist extends rcube_plugin
}
if ($success) {
- $message = $this->ical->method == 'REPLY' ? 'attendeupdateesuccess' : ($deleted ? 'successremoval' : ($existing ? 'updatedsuccessfully' : 'importedsuccessfully'));
+ $message = $task['_method'] == 'REPLY' ? 'attendeupdateesuccess' : ($deleted ? 'successremoval' : ($existing ? 'updatedsuccessfully' : 'importedsuccessfully'));
$this->rc->output->command('display_message', $this->gettext(array('name' => $message, 'vars' => array('list' => $list['name']))), 'confirmation');
$metadata['rsvp'] = intval($metadata['rsvp']);
@@ -1712,7 +1712,7 @@ class tasklist extends rcube_plugin
}
// send iTip reply
- if ($this->ical->method == 'REQUEST' && $organizer && !$noreply && !in_array(strtolower($organizer['email']), $emails) && !$error_msg) {
+ if ($task['_method'] == 'REQUEST' && $organizer && !$noreply && !in_array(strtolower($organizer['email']), $emails) && !$error_msg) {
$task['comment'] = rcube_utils::get_input_value('_comment', rcube_utils::INPUT_POST);
$itip = $this->load_itip();
$itip->set_sender_email($reply_sender);
More information about the commits
mailing list