]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(dav): Move DAV app to non deprecated event dispatcher
authorJoas Schilling <coding@schilljs.com>
Thu, 6 Jul 2023 08:52:19 +0000 (10:52 +0200)
committerJoas Schilling <coding@schilljs.com>
Fri, 7 Jul 2023 08:53:19 +0000 (10:53 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/dav/lib/AppInfo/Application.php
apps/dav/lib/CalDAV/CalDavBackend.php

index 10e1130f907837ad0b9b9d0d64c8f8bc120eeb69..fb82e8a3afecd41cfd82e33da3c58995c1e7b582 100644 (file)
@@ -71,6 +71,7 @@ use OCA\DAV\Events\CardDeletedEvent;
 use OCA\DAV\Events\CardUpdatedEvent;
 use OCA\DAV\Events\SubscriptionCreatedEvent;
 use OCA\DAV\Events\SubscriptionDeletedEvent;
+use OCP\EventDispatcher\IEventDispatcher;
 use OCP\Federation\Events\TrustedServerRemovedEvent;
 use OCA\DAV\HookManager;
 use OCA\DAV\Listener\ActivityUpdaterListener;
@@ -215,7 +216,7 @@ class Application extends App implements IBootstrap {
        }
 
        public function registerHooks(HookManager $hm,
-                                                                  EventDispatcherInterface $dispatcher,
+                                                                  IEventDispatcher $dispatcher,
                                                                   IAppContainer $container,
                                                                   IServerContainer $serverContainer) {
                $hm->setup();
@@ -227,7 +228,7 @@ class Application extends App implements IBootstrap {
                        }
                });
 
-               $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) use ($container) {
+               $dispatcher->addListener('OC\AccountManager::userUpdated', function ($event) use ($container) {
                        $user = $event->getSubject();
                        /** @var SyncService $syncService */
                        $syncService = $container->query(SyncService::class);
index c57d3a2764f1e88a2a4669f9128e46e40cdf1e95..ef41301b840fbb28cb23897ec0c6116c8a1beb6c 100644 (file)
@@ -2841,7 +2841,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
                        $calendarId = $shareable->getResourceId();
                        $calendarRow = $this->getCalendarById($calendarId);
                        if ($calendarRow === null) {
-                               throw new \RuntimeException('Trying to update shares for innexistant calendar: ' . $calendarId);
+                               throw new \RuntimeException('Trying to update shares for non-existing calendar: ' . $calendarId);
                        }
                        $oldShares = $this->getShares($calendarId);