Unset RSVP flag after replying; skip other user's namespace for invitations listing
This commit is contained in:
parent
4f9968d9ac
commit
ca5cb4ac01
5 changed files with 16 additions and 4 deletions
|
@ -896,14 +896,18 @@ class calendar extends rcube_plugin
|
|||
$noreply = intval(get_input_value('noreply', RCUBE_INPUT_GPC)) || $status == 'needs-action';
|
||||
$reload = $event['calendar'] != $ev['calendar'] ? 2 : 1;
|
||||
$organizer = null;
|
||||
$emails = $this->get_user_emails();
|
||||
foreach ($event['attendees'] as $i => $attendee) {
|
||||
if ($attendee['role'] == 'ORGANIZER') {
|
||||
$organizer = $attendee;
|
||||
break;
|
||||
}
|
||||
else if ($attendee['email'] && in_array(strtolower($attendee['email']), $emails)) {
|
||||
$reply_sender = $attendee['email'];
|
||||
}
|
||||
}
|
||||
if (!$noreply) {
|
||||
$itip = $this->load_itip();
|
||||
$itip->set_sender_email($reply_sender);
|
||||
$event['comment'] = $reply_comment;
|
||||
if ($organizer && $itip->send_itip_message($event, 'REPLY', $organizer, 'itipsubject' . $status, 'itipmailbody' . $status))
|
||||
$this->rc->output->command('display_message', $this->gettext(array('name' => 'sentresponseto', 'vars' => array('mailto' => $organizer['name'] ? $organizer['name'] : $organizer['email']))), 'confirmation');
|
||||
|
@ -2318,8 +2322,10 @@ class calendar extends rcube_plugin
|
|||
}
|
||||
else if ($attendee['email'] && in_array(strtolower($attendee['email']), $emails)) {
|
||||
$event['attendees'][$i]['status'] = strtoupper($status);
|
||||
if ($event['attendees'][$i]['status'] != 'NEEDS-ACTION')
|
||||
unset($event['attendees'][$i]['rsvp']); // remove RSVP attribute
|
||||
$metadata['attendee'] = $attendee['email'];
|
||||
$metadata['rsvp'] = $attendee['rsvp'] || $attendee['role'] != 'NON-PARTICIPANT';
|
||||
$metadata['rsvp'] = $attendee['role'] != 'NON-PARTICIPANT';
|
||||
$reply_sender = $attendee['email'];
|
||||
}
|
||||
}
|
||||
|
@ -2332,7 +2338,6 @@ class calendar extends rcube_plugin
|
|||
'email' => $sender_identity['email'],
|
||||
'role' => 'OPT-PARTICIPANT',
|
||||
'status' => strtoupper($status),
|
||||
'rsvp' => true,
|
||||
);
|
||||
$metadata['attendee'] = $sender_identity['email'];
|
||||
}
|
||||
|
|
|
@ -1928,8 +1928,10 @@ function rcube_calendar_ui(settings)
|
|||
// update attendee status
|
||||
for (var data, i=0; i < me.selected_event.attendees.length; i++) {
|
||||
data = me.selected_event.attendees[i];
|
||||
if (settings.identity.emails.indexOf(';'+String(data.email).toLowerCase()) >= 0)
|
||||
if (settings.identity.emails.indexOf(';'+String(data.email).toLowerCase()) >= 0) {
|
||||
data.status = response.toUpperCase();
|
||||
delete data.rsvp; // unset RSVP flag
|
||||
}
|
||||
}
|
||||
event_show_dialog(me.selected_event);
|
||||
|
||||
|
|
|
@ -215,6 +215,9 @@ class kolab_invitation_calendar
|
|||
$events = array();
|
||||
foreach (kolab_storage::list_folders('', '*', 'event', null) as $foldername) {
|
||||
$cal = new kolab_calendar($foldername, $this->cal);
|
||||
if ($cal->get_namespace() == 'other')
|
||||
continue;
|
||||
|
||||
foreach ($cal->list_events($start, $end, $search, 1, $query, array(array($subquery, 'OR'))) as $event) {
|
||||
$match = false;
|
||||
|
||||
|
|
|
@ -277,6 +277,7 @@ pre {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
#calendars .treelist div > a.quickview:focus,
|
||||
#calendars .treelist div > a.subscribed:focus {
|
||||
border-radius: 3px;
|
||||
outline: 2px solid rgba(30,150,192, 0.5);
|
||||
|
|
|
@ -205,6 +205,7 @@ class libcalendaring_itip
|
|||
}
|
||||
else if (strcasecmp($attedee['email'], $from) == 0 || strcasecmp($attendee['email'], $from_utf) == 0) {
|
||||
$replying_attendee = $attendee;
|
||||
unset($replying_attendee['rsvp']); // unset the RSVP attribute
|
||||
}
|
||||
}
|
||||
if ($replying_attendee) {
|
||||
|
|
Loading…
Add table
Reference in a new issue