diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-04 13:38:32 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-12 14:24:47 +0100 |
commit | 90d9834c8c0d3ae10cc754595d729821584e76a9 (patch) | |
tree | 7a50a81c630c835e131e9da3aaf2ac50aad2c88b /apps/dav/appinfo/app.php | |
parent | dbddbb634bcb6df346988b85cb2847e76e22e632 (diff) | |
download | nextcloud-server-90d9834c8c0d3ae10cc754595d729821584e76a9.tar.gz nextcloud-server-90d9834c8c0d3ae10cc754595d729821584e76a9.zip |
Decouple federation and dav app
Diffstat (limited to 'apps/dav/appinfo/app.php')
-rw-r--r-- | apps/dav/appinfo/app.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/dav/appinfo/app.php b/apps/dav/appinfo/app.php index bc889176f7f..d09003e19c0 100644 --- a/apps/dav/appinfo/app.php +++ b/apps/dav/appinfo/app.php @@ -19,6 +19,21 @@ * */ +use OCA\DAV\CardDAV\CardDavBackend; +use OCA\DAV\CardDAV\SyncService; +use OCA\DAV\Connector\Sabre\Principal; + +\OC::$server->registerService('CardDAVSyncService', function() { + $principalBackend = new Principal( + $this->config, + $this->userManager + ); + + $backend = new CardDavBackend($this->dbConnection, $principalBackend); + + return new SyncService($backend); +}); + $cm = \OC::$server->getContactsManager(); $cm->register(function() use ($cm) { $userId = \OC::$server->getUserSession()->getUser()->getUID(); |