diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-08-06 22:32:06 +0200 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-08-06 22:32:06 +0200 |
commit | 2f10598af69209f2e84797aaf3399536f824f564 (patch) | |
tree | 6b457c19fae5d45ea760f4429b4038811b22af07 /apps/contacts/carddav.php | |
parent | d9ccbe96dda717712d67274c777a0e614743784f (diff) | |
download | nextcloud-server-2f10598af69209f2e84797aaf3399536f824f564.tar.gz nextcloud-server-2f10598af69209f2e84797aaf3399536f824f564.zip |
New app: contacts
Diffstat (limited to 'apps/contacts/carddav.php')
-rw-r--r-- | apps/contacts/carddav.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/apps/contacts/carddav.php b/apps/contacts/carddav.php new file mode 100644 index 00000000000..ae2c5b97363 --- /dev/null +++ b/apps/contacts/carddav.php @@ -0,0 +1,28 @@ +<?php + +// Do not load FS ... +$RUNTIME_NOSETUPFS = true; + +require_once('../../lib/base.php'); + +// Backends +$authBackend = new OC_Connector_Sabre_Auth(); +$principalBackend = new OC_Connector_Sabre_Principal(); +$carddavBackend = new OC_Connector_Sabre_CardDAV(); + +// Root nodes +$nodes = array( + new Sabre_DAVACL_PrincipalCollection($principalBackend), + new Sabre_CardDAV_AddressBookRoot($principalBackend, $carddavBackend), +); + +// Fire up server +$server = new Sabre_DAV_Server($nodes); +$server->setBaseUri($WEBROOT.'/apps/contacts/carddav.php'); +// Add plugins +$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); +$server->addPlugin(new Sabre_CardDAV_Plugin()); +$server->addPlugin(new Sabre_DAVACL_Plugin()); + +// And off we go! +$server->exec(); |