Skip to content

Commit 1afdbe4

Browse files
docs(dav): improve CalDavBackend::getCalendarObjectByUID doc
Signed-off-by: Josh <josh.t.richards@gmail.com>
1 parent 9808efb commit 1afdbe4

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

apps/dav/lib/CalDAV/CalDavBackend.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,14 +2636,17 @@ public function searchPrincipalUri(string $principalUri,
26362636
}
26372637

26382638
/**
2639-
* Find the path of the calendar object with a given UID in calendars owned by
2640-
* a particular principal (user).
2639+
* Finds the path to the calendar object matching a given UID, restricted to
2640+
* calendars owned by the specified principal. Calendars owned by other
2641+
* principals, even if visible in the principal's calendar home (e.g. via
2642+
* sharing), are ignored.
26412643
*
2642-
* When $calendarUri is provided, the lookup is restricted to that calendar.
2643-
* When it is null, all of the principal's calendars are searched. In that
2644-
* case, callers must use both path components returned by this method: the
2645-
* matching object may belong to a different calendar than one the caller
2646-
* currently has selected.
2644+
* When $calendarUri is provided, the lookup is further restricted to that
2645+
* calendar. It must be owned by $principalUri, otherwise no match is returned.
2646+
* When $calendarUri is null, all calendars owned by the principal are searched.
2647+
* In that case, callers must use both path components returned by this method:
2648+
* the matching object may belong to a different calendar than the one the
2649+
* caller currently has selected.
26472650
*
26482651
* Subscription and federated cached objects, deleted objects, and objects in
26492652
* deleted calendars are not considered.
@@ -2652,11 +2655,12 @@ public function searchPrincipalUri(string $principalUri,
26522655
* "<calendar-uri>/<object-uri>". It is null when no matching object exists.
26532656
* UID uniqueness is guaranteed only within a calendar collection. Therefore,
26542657
* an unrestricted lookup can be ambiguous if multiple owned calendars contain
2655-
* the same UID.
2658+
* the same UID; in that case, one database-dependent matching result is
2659+
* returned and no calendar is preferred.
26562660
*
26572661
* @param string $principalUri
26582662
* @param string $uid
2659-
* @param string|null $calendarUri Calendar URI to restrict the lookup to.
2663+
* @param string|null $calendarUri Calendar URI to restrict the lookup to; must be owned by $principalUri.
26602664
* @return string|null
26612665
*/
26622666
#[\Override]

0 commit comments

Comments
 (0)