|
|
|
@ -848,7 +848,6 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function updateCalendar($calendarId, PropPatch $propPatch) {
|
|
|
|
|
$this->atomic(function () use ($calendarId, $propPatch) {
|
|
|
|
|
$supportedProperties = array_keys($this->propertyMap);
|
|
|
|
|
$supportedProperties[] = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp';
|
|
|
|
|
|
|
|
|
@ -866,6 +865,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
[$calendarData, $shares] = $this->atomic(function () use ($calendarId, $newValues) {
|
|
|
|
|
$query = $this->db->getQueryBuilder();
|
|
|
|
|
$query->update('calendars');
|
|
|
|
|
foreach ($newValues as $fieldName => $value) {
|
|
|
|
@ -878,11 +878,13 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
|
|
|
|
|
|
|
|
|
$calendarData = $this->getCalendarById($calendarId);
|
|
|
|
|
$shares = $this->getShares($calendarId);
|
|
|
|
|
return [$calendarData, $shares];
|
|
|
|
|
}, $this->db);
|
|
|
|
|
|
|
|
|
|
$this->dispatcher->dispatchTyped(new CalendarUpdatedEvent($calendarId, $calendarData, $shares, $mutations));
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
});
|
|
|
|
|
}, $this->db);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -2570,7 +2572,6 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function updateSubscription($subscriptionId, PropPatch $propPatch) {
|
|
|
|
|
$this->atomic(function () use ($subscriptionId, $propPatch) {
|
|
|
|
|
$supportedProperties = array_keys($this->subscriptionPropertyMap);
|
|
|
|
|
$supportedProperties[] = '{http://calendarserver.org/ns/}source';
|
|
|
|
|
|
|
|
|
@ -2586,6 +2587,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$subscriptionRow = $this->atomic(function () use ($subscriptionId, $newValues) {
|
|
|
|
|
$query = $this->db->getQueryBuilder();
|
|
|
|
|
$query->update('calendarsubscriptions')
|
|
|
|
|
->set('lastmodified', $query->createNamedParameter(time()));
|
|
|
|
@ -2595,12 +2597,13 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
|
|
|
|
$query->where($query->expr()->eq('id', $query->createNamedParameter($subscriptionId)))
|
|
|
|
|
->executeStatement();
|
|
|
|
|
|
|
|
|
|
$subscriptionRow = $this->getSubscriptionById($subscriptionId);
|
|
|
|
|
return $this->getSubscriptionById($subscriptionId);
|
|
|
|
|
}, $this->db);
|
|
|
|
|
|
|
|
|
|
$this->dispatcher->dispatchTyped(new SubscriptionUpdatedEvent((int)$subscriptionId, $subscriptionRow, [], $mutations));
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
});
|
|
|
|
|
}, $this->db);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|