aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CardDAV/SyncService.php
diff options
context:
space:
mode:
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;