add version migration of sabredav from 1.8.1 to 4.0.3 and updated files where it is used

This commit is contained in:
Ivymaster
2026-06-30 13:59:36 +02:00
parent ac5478f176
commit 5499c522cb
5 changed files with 83 additions and 50 deletions
+3 -2
View File
@@ -19,7 +19,7 @@ $calendarBackend = new MySabre_CalDAV_Backend($authBackend);
$tree = array(
new \Sabre\CalDAV\Principal\Collection($principalBackend),
new \Sabre\CalDAV\CalendarRootNode($principalBackend, $calendarBackend)
new \Sabre\CalDAV\CalendarRoot($principalBackend, $calendarBackend)
);
// The object tree needs in turn to be passed to the server class
@@ -32,7 +32,8 @@ $path = str_replace($_SERVER['DOCUMENT_ROOT'],'',__FILE__).'/';
$server->setBaseUri($path);
// Authentication plugin
$authPlugin = new \Sabre\DAV\Auth\Plugin($authBackend,'SabreDAV');
$authBackend->setRealm('SabreDAV');
$authPlugin = new \Sabre\DAV\Auth\Plugin($authBackend);
$server->addPlugin($authPlugin);
// CalDAV plugin