Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions apps/dav/lib/CalDAV/CalDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,13 @@ public function __construct(
}

/**
* Return the number of calendars for a principal
* Return the number of calendars owned by the given principal.
*
* By default this excludes the automatically generated birthday calendar
* Calendars shared with the given principal are not counted!
*
* @param $principalUri
* @param bool $excludeBirthday
* @return int
* By default, this excludes the automatically generated birthday calendar.
*/
public function getCalendarsForUserCount($principalUri, $excludeBirthday = true) {
public function getCalendarsForUserCount(string $principalUri, bool $excludeBirthday = true): int {
$principalUri = $this->convertPrincipal($principalUri, true);
$query = $this->db->getQueryBuilder();
$query->select($query->func()->count('*'))
Expand Down Expand Up @@ -1040,7 +1038,7 @@ public function exportCalendar(int $calendarId, int $calendarType = self::CALEND
$rs->closeCursor();
}
}

/**
* Returns all calendar objects with limited metadata for a calendar
*
Expand Down
Loading