diff options
author | Georg Ehrke <developer@georgehrke.com> | 2020-07-28 09:35:51 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-18 21:40:57 +0200 |
commit | 67f1ef46583e5135cfb6d0e5cbfbe441be0803a6 (patch) | |
tree | c2c4fa3dba8437dd607513b6bc204944055d520a /apps/dav/lib/RootCollection.php | |
parent | 5ced155032c51a90b8a9ffb6b1159a34c29194ef (diff) | |
download | nextcloud-server-67f1ef46583e5135cfb6d0e5cbfbe441be0803a6.tar.gz nextcloud-server-67f1ef46583e5135cfb6d0e5cbfbe441be0803a6.zip |
Add Typed Events for CalDAV- and CardDAV-related Events
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/dav/lib/RootCollection.php')
-rw-r--r-- | apps/dav/lib/RootCollection.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/dav/lib/RootCollection.php b/apps/dav/lib/RootCollection.php index 53cba3eefa0..83f3691959b 100644 --- a/apps/dav/lib/RootCollection.php +++ b/apps/dav/lib/RootCollection.php @@ -45,6 +45,7 @@ use OCA\DAV\Provisioning\Apple\AppleProvisioningNode; use OCA\DAV\Upload\CleanupService; use OCP\App\IAppManager; use OCP\AppFramework\Utility\ITimeFactory; +use OCP\EventDispatcher\IEventDispatcher; use Sabre\DAV\SimpleCollection; class RootCollection extends SimpleCollection { @@ -58,7 +59,8 @@ class RootCollection extends SimpleCollection { $groupManager = \OC::$server->getGroupManager(); $shareManager = \OC::$server->getShareManager(); $db = \OC::$server->getDatabaseConnection(); - $dispatcher = \OC::$server->getEventDispatcher(); + $dispatcher = \OC::$server->get(IEventDispatcher::class); + $legacyDispatcher = \OC::$server->getEventDispatcher(); $proxyMapper = \OC::$server->query(ProxyMapper::class); $userPrincipalBackend = new Principal( @@ -91,14 +93,14 @@ class RootCollection extends SimpleCollection { $filesCollection = new Files\RootCollection($userPrincipalBackend, 'principals/users'); $filesCollection->disableListing = $disableListing; - $caldavBackend = new CalDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $random, $logger, $dispatcher); + $caldavBackend = new CalDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $random, $logger, $dispatcher, $legacyDispatcher); $userCalendarRoot = new CalendarRoot($userPrincipalBackend, $caldavBackend, 'principals/users'); $userCalendarRoot->disableListing = $disableListing; - $resourceCalendarCaldavBackend = new CalDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $random, $logger, $dispatcher); + $resourceCalendarCaldavBackend = new CalDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $random, $logger, $dispatcher, $legacyDispatcher); $resourceCalendarRoot = new CalendarRoot($calendarResourcePrincipalBackend, $caldavBackend, 'principals/calendar-resources'); $resourceCalendarRoot->disableListing = $disableListing; - $roomCalendarCaldavBackend = new CalDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $random, $logger, $dispatcher); + $roomCalendarCaldavBackend = new CalDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $random, $logger, $dispatcher, $legacyDispatcher); $roomCalendarRoot = new CalendarRoot($calendarRoomPrincipalBackend, $roomCalendarCaldavBackend, 'principals/calendar-rooms'); $roomCalendarRoot->disableListing = $disableListing; @@ -126,11 +128,11 @@ class RootCollection extends SimpleCollection { ); $pluginManager = new PluginManager(\OC::$server, \OC::$server->query(IAppManager::class)); - $usersCardDavBackend = new CardDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $dispatcher); + $usersCardDavBackend = new CardDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $dispatcher, $legacyDispatcher); $usersAddressBookRoot = new AddressBookRoot($userPrincipalBackend, $usersCardDavBackend, $pluginManager, 'principals/users'); $usersAddressBookRoot->disableListing = $disableListing; - $systemCardDavBackend = new CardDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $dispatcher); + $systemCardDavBackend = new CardDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $dispatcher, $legacyDispatcher); $systemAddressBookRoot = new AddressBookRoot(new SystemPrincipalBackend(), $systemCardDavBackend, $pluginManager, 'principals/system'); $systemAddressBookRoot->disableListing = $disableListing; |