Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/private/Calendar/Manager.php17
-rw-r--r--lib/public/Calendar/ICalendarProvider.php4
-rw-r--r--lib/public/Calendar/IManager.php11
-rw-r--r--version.php4
4 files changed, 26 insertions, 10 deletions
diff --git a/lib/private/Calendar/Manager.php b/lib/private/Calendar/Manager.php
index 3fa4b55d1ea..16e142264aa 100644
--- a/lib/private/Calendar/Manager.php
+++ b/lib/private/Calendar/Manager.php
@@ -167,15 +167,14 @@ class Manager implements IManager {
$this->calendarLoaders = [];
}
- public function searchForPrincipal(ICalendarQuery $query): array {
+ public function getCalendarsForPrincipal(string $principalUri, array $calendarUris = []): array {
$context = $this->coordinator->getRegistrationContext();
if ($context === null) {
return [];
}
- /** @var CalendarQuery $query */
- $calendars = array_merge(
- ...array_map(function ($registration) use ($query) {
+ return array_merge(
+ ...array_map(function ($registration) use ($principalUri, $calendarUris) {
try {
/** @var ICalendarProvider $provider */
$provider = $this->container->get($registration->getService());
@@ -186,9 +185,17 @@ class Manager implements IManager {
return [];
}
- return $provider->getCalendars($query->getPrincipalUri(), $query->getCalendarUris());
+ return $provider->getCalendars($principalUri, $calendarUris);
}, $context->getCalendarProviders())
);
+ }
+
+ public function searchForPrincipal(ICalendarQuery $query): array {
+ /** @var CalendarQuery $query */
+ $calendars = $this->getCalendarsForPrincipal(
+ $query->getPrincipalUri(),
+ $query->getCalendarUris(),
+ );
$results = [];
/** @var ICalendar $calendar */
diff --git a/lib/public/Calendar/ICalendarProvider.php b/lib/public/Calendar/ICalendarProvider.php
index d135910b08c..14ef644e580 100644
--- a/lib/public/Calendar/ICalendarProvider.php
+++ b/lib/public/Calendar/ICalendarProvider.php
@@ -36,8 +36,8 @@ namespace OCP\Calendar;
interface ICalendarProvider {
/**
- * @param string $principalUri
- * @param string[] $calendarUris
+ * @param string $principalUri URI of the principal
+ * @param string[] $calendarUris optionally specify which calendars to load, or all if this array is empty
* @return ICalendar[]
* @since 23.0.0
*/
diff --git a/lib/public/Calendar/IManager.php b/lib/public/Calendar/IManager.php
index eb4113bba99..7f0eec80910 100644
--- a/lib/public/Calendar/IManager.php
+++ b/lib/public/Calendar/IManager.php
@@ -118,7 +118,7 @@ interface IManager {
/**
* @return ICalendar[]
* @since 13.0.0
- * @deprecated 23.0.0
+ * @deprecated 23.0.0 use \OCP\Calendar\IManager::getCalendarsForPrincipal
*/
public function getCalendars();
@@ -132,6 +132,15 @@ interface IManager {
public function clear();
/**
+ * @param string $principalUri URI of the principal
+ * @param string[] $calendarUris optionally specify which calendars to load, or all if this array is empty
+ *
+ * @return ICalendar[]
+ * @since 23.0.0
+ */
+ public function getCalendarsForPrincipal(string $principalUri, array $calendarUris = []): array;
+
+ /**
* Query a principals calendar(s)
*
* @param ICalendarQuery $query
diff --git a/version.php b/version.php
index 2d6dbf9ea7f..a46603056b5 100644
--- a/version.php
+++ b/version.php
@@ -30,10 +30,10 @@
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
// when updating major/minor version number.
-$OC_Version = [23, 0, 0, 5];
+$OC_Version = [23, 0, 0, 6];
// The human readable string
-$OC_VersionString = '23.0.0 beta 2';
+$OC_VersionString = '23.0.0 beta 3';
$OC_VersionCanBeUpgradedFrom = [
'nextcloud' => [