summaryrefslogtreecommitdiff
path: root/public_html
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-06-20 13:52:35 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-06-20 13:52:35 (GMT)
commitaa67eb6fd91fe78373ef961b0207fe29fa9398a1 (patch)
treeb87b6c387ea982671ed4ccad8bb386eecc91db9b /public_html
parent84789326b63f7c976b7fd079cd301e8c6b0e4478 (diff)
downloadiRony-aa67eb6fd91fe78373ef961b0207fe29fa9398a1.tar.gz
Fix WebDAV service for Mac OS X Finder: add support for locking (otherwise mounted read-only); handle the numerous attempts to read and write hidden/temp files
Diffstat (limited to 'public_html')
-rw-r--r--public_html/index.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/public_html/index.php b/public_html/index.php
index d201ed8..f9c86b4 100644
--- a/public_html/index.php
+++ b/public_html/index.php
@@ -129,6 +129,14 @@ $caldav_plugin = new \Kolab\CalDAV\Plugin();
$caldav_plugin->setIMipHandler(new \Kolab\CalDAV\IMip());
$server->addPlugin($caldav_plugin);
+// the lock manager is reponsible for making sure users don't overwrite each others changes.
+// TODO: replace this with a class that manages locks in the Kolab backend
+$locks_backend = new \Sabre\DAV\Locks\Backend\File(KOLAB_DAV_ROOT . '/temp/locks');
+$server->addPlugin(new \Sabre\DAV\Locks\Plugin($locks_backend));
+
+// intercept some of the garbage files operation systems tend to generate when mounting a WebDAV share
+$server->addPlugin(new \Sabre\DAV\TemporaryFileFilterPlugin(KOLAB_DAV_ROOT . '/temp'));
+
// HTML UI for browser-based access (recommended only for development)
$server->addPlugin(new \Sabre\DAV\Browser\Plugin());