diff options
author | Georg Ehrke <developer@georgehrke.com> | 2019-08-02 16:40:35 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-08-15 20:02:56 +0200 |
commit | c5147529af4fac3eb8ac7bc4db3d10867600edaf (patch) | |
tree | 3dd603f786c082890bec5dee21728fc5b30d8935 | |
parent | a6f792616c37bb63fa826bb6d897738ad5227d6d (diff) | |
download | nextcloud-server-c5147529af4fac3eb8ac7bc4db3d10867600edaf.tar.gz nextcloud-server-c5147529af4fac3eb8ac7bc4db3d10867600edaf.zip |
Stop using deprecated registerNotifier, use registerNotifierService instead
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
-rw-r--r-- | apps/dav/lib/AppInfo/Application.php | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php index 2e3b95d8bfa..1c5505d0585 100644 --- a/apps/dav/lib/AppInfo/Application.php +++ b/apps/dav/lib/AppInfo/Application.php @@ -248,20 +248,14 @@ class Application extends App { return $this->getContainer()->query(SyncService::class); } - public function registerNotifier() { - $this->getContainer()->getServer()->getNotificationManager()->registerNotifier(function() { - return $this->getContainer()->query(Notifier::class); - }, function() { - $l = $this->getContainer()->getServer()->getL10NFactory()->get(self::APP_ID); - return [ - 'id' => self::APP_ID, - 'name' => $l->t('Calendars and Contacts'), - ]; - }); + public function registerNotifier():void { + $this->getContainer() + ->getServer() + ->getNotificationManager() + ->registerNotifierService(Notifier::class); } - public function registerCalendarReminders(): void - { + public function registerCalendarReminders():void { try { /** @var NotificationProviderManager $notificationProviderManager */ $notificationProviderManager = $this->getContainer()->query(NotificationProviderManager::class); |