From 2f7822fbdb895621596d11c7277bba977f609a20 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 16 Aug 2016 21:40:39 +0200 Subject: use route to create link --- lib/BackgroundJobs/AdminNotification.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/BackgroundJobs/AdminNotification.php b/lib/BackgroundJobs/AdminNotification.php index a59a152..25f3958 100644 --- a/lib/BackgroundJobs/AdminNotification.php +++ b/lib/BackgroundJobs/AdminNotification.php @@ -29,11 +29,13 @@ class AdminNotification extends QueuedJob { $urlGenerator = \OC::$server->getURLGenerator(); $notification = $manager->createNotification(); + $url = $urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'survey_client']); + $notification->setApp('survey_client') ->setDateTime(new \DateTime()) ->setSubject('updated') ->setObject('dummy', 23) - ->setLink($urlGenerator->getAbsoluteURL('index.php/settings/admin/survey_client')); + ->setLink($url); $enableAction = $notification->createAction(); $enableAction->setLabel('enable') -- cgit v1.2.3