diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index dcd4c98b..ce194ff8 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -3464,7 +3464,7 @@ $("#rcmfd_new_category").keypress(function(event) { $update_attendees[] = $attendee; $metadata['fallback'] = $attendee['status']; $metadata['attendee'] = $attendee['email']; - $metadata['rsvp'] = !empty($attendee['rsvp']) || $attendee['role'] != 'NON-PARTICIPANT'; + $metadata['rsvp'] = !empty($attendee['rsvp']) || empty($attendee['role']) || $attendee['role'] != 'NON-PARTICIPANT'; $existing_attendee_emails = []; diff --git a/plugins/calendar/drivers/caldav/caldav_calendar.php b/plugins/calendar/drivers/caldav/caldav_calendar.php index 260ca9cc..ec020b0e 100644 --- a/plugins/calendar/drivers/caldav/caldav_calendar.php +++ b/plugins/calendar/drivers/caldav/caldav_calendar.php @@ -64,14 +64,17 @@ class caldav_calendar extends kolab_storage_dav_folder // $this->storage = kolab_storage_dav::get_folder($folder_or_id, 'event'); } - $this->cal = $calendar; - $this->id = $this->storage->id; - $this->attributes = $this->storage->attributes; - $this->ready = true; - $this->alarms = !isset($this->storage->attributes['alarms']) || $this->storage->attributes['alarms']; + $this->cal = $calendar; + $this->ready = !empty($this->storage); // Set writeable and alarms flags according to folder permissions if ($this->ready) { + $this->id = $this->storage->id; + $this->attributes = $this->storage->attributes; + $this->default = $this->storage->default; + $this->subtype = $this->storage->subtype; + $this->alarms = !isset($this->attributes['alarms']) || $this->attributes['alarms']; + if ($this->storage->get_namespace() == 'personal') { $this->editable = true; $this->rights = 'lrswikxteav'; @@ -86,9 +89,6 @@ class caldav_calendar extends kolab_storage_dav_folder } } } - - $this->default = $this->storage->default; - $this->subtype = $this->storage->subtype; } /** diff --git a/plugins/kolab_addressbook/drivers/carddav/carddav_contacts_driver.php b/plugins/kolab_addressbook/drivers/carddav/carddav_contacts_driver.php index 006a54e2..a7cec89a 100644 --- a/plugins/kolab_addressbook/drivers/carddav/carddav_contacts_driver.php +++ b/plugins/kolab_addressbook/drivers/carddav/carddav_contacts_driver.php @@ -162,8 +162,8 @@ class carddav_contacts_driver $result = $storage->folder_update($prop); if ($result && ($abook = $this->get_address_book($prop['id'] ?: $result))) { - $abook->id = $prop['id'] ?: $result; - $props = $this->abook_prop($abook->id, $abook); + $abook_id = $prop['id'] ?: $result; + $props = $this->abook_prop($abook_id, $abook); $this->rc->output->show_message('kolab_addressbook.book'.$type.'d', 'confirmation'); $this->rc->output->command('book_update', $props, $prop['id']);