mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Fix loading all principal calendars in the dav app calendar provider
If we load all calendar infos of a principal then we get back an array and not a single calendar info. This was handled incorrectly and an array of calendar infos were passed to the calendar implementation, resulting in interesting bugs. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
92d4844e0b
commit
603a88f2ee
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ class CalendarProvider implements ICalendarProvider {
|
|||
public function getCalendars(string $principalUri, array $calendarUris = []): array {
|
||||
$calendarInfos = [];
|
||||
if (empty($calendarUris)) {
|
||||
$calendarInfos[] = $this->calDavBackend->getCalendarsForUser($principalUri);
|
||||
$calendarInfos = $this->calDavBackend->getCalendarsForUser($principalUri);
|
||||
} else {
|
||||
foreach ($calendarUris as $calendarUri) {
|
||||
$calendarInfos[] = $this->calDavBackend->getCalendarByUri($principalUri, $calendarUri);
|
||||
|
|
|
|||
Loading…
Reference in a new issue