Bladeren bron

Merge pull request #45312 from nextcloud/backport/45309/stable28

[stable28] fix(caldav): loop through all events for busy events
tags/v28.0.6rc1
Anna 1 week geleden
bovenliggende
commit
10dfb76f28
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 9 en 12 verwijderingen
  1. 9
    12
      apps/dav/lib/CalDAV/CalendarObject.php

+ 9
- 12
apps/dav/lib/CalDAV/CalendarObject.php Bestand weergeven

@@ -97,19 +97,16 @@ class CalendarObject extends \Sabre\CalDAV\CalendarObject {
* @param Component\VCalendar $vObject
* @return void
*/
private function createConfidentialObject(Component\VCalendar $vObject) {
private function createConfidentialObject(Component\VCalendar $vObject): void {
/** @var Component $vElement */
$vElement = null;
if (isset($vObject->VEVENT)) {
$vElement = $vObject->VEVENT;
}
if (isset($vObject->VJOURNAL)) {
$vElement = $vObject->VJOURNAL;
}
if (isset($vObject->VTODO)) {
$vElement = $vObject->VTODO;
}
if (!is_null($vElement)) {
$vElements = array_filter($vObject->getComponents(), static function ($vElement) {
return $vElement instanceof Component\VEvent || $vElement instanceof Component\VJournal || $vElement instanceof Component\VTodo;
});

foreach ($vElements as $vElement) {
if (empty($vElement->select('SUMMARY'))) {
$vElement->add('SUMMARY', $this->l10n->t('Busy')); // This is needed to mask "Untitled Event" events
}
foreach ($vElement->children() as &$property) {
/** @var Property $property */
switch ($property->name) {

Laden…
Annuleren
Opslaan