Unset 'rsvp' flag when changing attendee status
This commit is contained in:
parent
fe7142b8c4
commit
ff7f8f76d3
1 changed files with 8 additions and 3 deletions
|
@ -386,6 +386,7 @@ class libcalendaring extends rcube_plugin
|
||||||
* Get a list of email addresses of the given user (from login and identities)
|
* Get a list of email addresses of the given user (from login and identities)
|
||||||
*
|
*
|
||||||
* @param string User Email (default to current user)
|
* @param string User Email (default to current user)
|
||||||
|
*
|
||||||
* @return array Email addresses related to the user
|
* @return array Email addresses related to the user
|
||||||
*/
|
*/
|
||||||
public function get_user_emails($user = null)
|
public function get_user_emails($user = null)
|
||||||
|
@ -418,10 +419,13 @@ class libcalendaring extends rcube_plugin
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the given participant status to the attendee matching the current user's identities
|
* Set the given participant status to the attendee matching the current user's identities
|
||||||
|
* Unsets 'rsvp' flag too.
|
||||||
*
|
*
|
||||||
* @param array Hash array with event struct
|
* @param array &$event Event data
|
||||||
* @param string The PARTSTAT value to set
|
* @param string $status The PARTSTAT value to set
|
||||||
* @return mixed Email address of the updated attendee or False if none matching found
|
* @param bool $recursive Recurive call
|
||||||
|
*
|
||||||
|
* @return mixed Email address of the updated attendee or False if none matching found
|
||||||
*/
|
*/
|
||||||
public function set_partstat(&$event, $status, $recursive = true)
|
public function set_partstat(&$event, $status, $recursive = true)
|
||||||
{
|
{
|
||||||
|
@ -430,6 +434,7 @@ class libcalendaring extends rcube_plugin
|
||||||
foreach ((array)$event['attendees'] as $i => $attendee) {
|
foreach ((array)$event['attendees'] as $i => $attendee) {
|
||||||
if ($attendee['email'] && in_array(strtolower($attendee['email']), $emails)) {
|
if ($attendee['email'] && in_array(strtolower($attendee['email']), $emails)) {
|
||||||
$event['attendees'][$i]['status'] = strtoupper($status);
|
$event['attendees'][$i]['status'] = strtoupper($status);
|
||||||
|
unset($event['attendees'][$i]['rsvp']);
|
||||||
$success = $attendee['email'];
|
$success = $attendee['email'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue