aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CardDAV/SyncService.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2025-02-28 17:17:15 +0100
committerAndy Scherzinger <info@andy-scherzinger.de>2025-03-30 14:47:22 +0200
commit6006425b5455813d567401c1f17d78cf549e9497 (patch)
treec0187cd032780d979cd90b9f1b2be03fe105446d /apps/dav/lib/CardDAV/SyncService.php
parent7252b6bb84163c0dfdb9e66597156786629a6ce3 (diff)
downloadnextcloud-server-backport/51144/stable30.tar.gz
nextcloud-server-backport/51144/stable30.zip
fix(dav): Create SAB at installationbackport/51144/stable30
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/CardDAV/SyncService.php')
-rw-r--r--apps/dav/lib/CardDAV/SyncService.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php
index 356903b3f69..264d34a150b 100644
--- a/apps/dav/lib/CardDAV/SyncService.php
+++ b/apps/dav/lib/CardDAV/SyncService.php
@@ -108,6 +108,12 @@ class SyncService {
}, $this->dbConnection);
}
+ public function ensureLocalSystemAddressBookExists(): ?array {
+ return $this->ensureSystemAddressBookExists('principals/system/system', 'system', [
+ '{' . Plugin::NS_CARDDAV . '}addressbook-description' => 'System addressbook which holds all users of this instance'
+ ]);
+ }
+
private function prepareUri(string $host, string $path): string {
/*
* The trailing slash is important for merging the uris together.
@@ -263,10 +269,7 @@ class SyncService {
*/
public function getLocalSystemAddressBook() {
if (is_null($this->localSystemAddressBook)) {
- $systemPrincipal = "principals/system/system";
- $this->localSystemAddressBook = $this->ensureSystemAddressBookExists($systemPrincipal, 'system', [
- '{' . Plugin::NS_CARDDAV . '}addressbook-description' => 'System addressbook which holds all users of this instance'
- ]);
+ $this->localSystemAddressBook = $this->ensureLocalSystemAddressBookExists();
}
return $this->localSystemAddressBook;